Comments (13)
Hi @Hoppus, thanks for the report! We haven't heard of anyone hitting this issue. Can you provide step-by-step instructions on how to reproduce the failure and/or attach a sample project exhibiting the issue?
from swift-snapshot-testing.
@stephencelis
I created new project from scratch but after I added pod, I started to get this failed message:
SnapshotTestApp[31552:1158378] Failed to load test bundle from file:///Users/eugenypopov/Library/Developer/Xcode/DerivedData/SnapshotTestApp-ezokglikaewvzbdydofehynpzvvd/Build/Products/Debug-iphonesimulator/SnapshotTestApp.app/PlugIns/SnapshotTestAppTests.xctest/: Error Domain=NSCocoaErrorDomain Code=3587 "dlopen_preflight(/Users/eugenypopov/Library/Developer/Xcode/DerivedData/SnapshotTestApp-ezokglikaewvzbdydofehynpzvvd/Build/Products/Debug-iphonesimulator/SnapshotTestApp.app/PlugIns/SnapshotTestAppTests.xctest/SnapshotTestAppTests):
Library not loaded: @rpath/libswiftGLKit.dylib
Referenced from: /Users/eugenypopov/Library/Developer/Xcode/DerivedData/SnapshotTestApp-ezokglikaewvzbdydofehynpzvvd/Build/Products/Debug-iphonesimulator/SnapshotTestApp.app/PlugIns/SnapshotTestAppTests.xctest/Frameworks/SnapshotTesting.framework/SnapshotTesting
Reason: image not found" UserInfo={NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Users/eugenypopov/Library/Developer/Xcode/DerivedData/SnapshotTestApp-ezokglikaewvzbdydofehynpzvvd/Build/Products/Debug-iphonesimulator/SnapshotTestApp.app/PlugIns/SnapshotTestAppTests.xctest/SnapshotTestAppTests, NSDebugDescription=dlopen_preflight(/Users/eugenypopov/Library/Developer/Xcode/DerivedData/SnapshotTestApp-ezokglikaewvzbdydofehynpzvvd/Build/Products/Debug-iphonesimulator/SnapshotTestApp.app/PlugIns/SnapshotTestAppTests.xctest/SnapshotTestAppTests): Library not loaded: @rpath/libswiftGLKit.dylib
Referenced from: /Users/eugenypopov/Library/Developer/Xcode/DerivedData/SnapshotTestApp-ezokglikaewvzbdydofehynpzvvd/Build/Products/Debug-iphonesimulator/SnapshotTestApp.app/PlugIns/SnapshotTestAppTests.xctest/Frameworks/SnapshotTesting.framework/SnapshotTesting
Reason: image not found, NSBundlePath=/Users/eugenypopov/Library/Developer/Xcode/DerivedData/SnapshotTestApp-ezokglikaewvzbdydofehynpzvvd/Build/Products/Debug-iphonesimulator/SnapshotTestApp.app/PlugIns/SnapshotTestAppTests.xctest, NSLocalizedDescription=The bundle “SnapshotTestAppTests” couldn’t be loaded because it is damaged or missing necessary resources.}
Podfile:
platform :ios, '12'
inhibit_all_warnings!
use_frameworks!
target 'SnapshotTestAppTests' do
pod 'SnapshotTesting', '~> 1.1'
end
from swift-snapshot-testing.
@Hoppus I think you want to set your Podfile up for your app target as a whole. Can you change your Podfile to the following?
platform :ios, '12'
inhibit_all_warnings!
use_frameworks!
target 'SnapshotTestApp' do
target 'SnapshotTestAppTests' do
pod 'SnapshotTesting', '~> 1.1'
end
end
Can you also verify that the SnapshotTestAppTests
target was generated with your new project? It's possible the "Include Unit Tests" option was unchecked.
from swift-snapshot-testing.
@stephencelis
It's still the same error message.
Unit Tests Included.
Don't know why it doesn't work.
Here's the project if you could take a look
https://www.dropbox.com/s/h8ohqlq9mvfw8no/SnapshotTestApp.zip
from swift-snapshot-testing.
Hey @Hoppus. Someone else reported the issue here:
I've followed up with a comment that shows a working Podfile vs. a non-working one. But, basically, we wanna go back to a non-nested config for now. This Podfile in its entirety works for me:
target 'SnapshotTestAppTests' do
pod 'SnapshotTesting', '~> 1.1'
end
from swift-snapshot-testing.
I still don't know how to fix it
If someone could help it would be really nice.
from swift-snapshot-testing.
I just created new file and it started to work 🤔😩
from swift-snapshot-testing.
@stephencelis sorry for raising this old issue again. But it randomly started happening to our project too. I thought it was Xcode 11 related but other colleagues on 10 are also seeing issues. I've never seen it happen before today so not sure what can be the trigger.
Our Podfile does have the test target nested to the app target. Is that what's causing problems?
from swift-snapshot-testing.
Same as @alexito4 we just saw this issue happening. We had the test target nested in the Podfile so we updated to have it separated but same issue. Do we know what's causing this and how to fix it?
from swift-snapshot-testing.
I just recreated test file, and the issue was gone
from swift-snapshot-testing.
I have it working fine on my local machine but the test fails in other machines or in CI with the "file doesn't exist" error. I tried refactoring the Podfile to extract the test target, remove and re-add the file, still getting the error.
from swift-snapshot-testing.
I got it... I had a case difference between the Xcode group name and Finder folder name (one was all caps, the other was capitalized) hence why the framework couldn't find the file in the Finder. Updating the folder name to match with the Xcode group fixed the issue.
from swift-snapshot-testing.
I had problem also and figured out that for framework it doesn’t matter. SnapshotFolder
or snapshotfolder
are equal. So if you change capitalization remember to rename snapshot folder inside _Snapshots_
from swift-snapshot-testing.
Related Issues (20)
- Timeout Error During Snapshot Testing with WKWebView
- Snapshots tests fail when Json returns in different order, HOT 1
- macCatalyst: Snapshots generated differ a lot between local computer and a MacStadium M1 mac mini HOT 1
- Run success on local and xcode on CI Runner but test failed when using fastlane run_tests HOT 5
- Text-based snapshots break across platforms due to line ending differences HOT 2
- Undefined symbols Linker command failed with exit code 1. HOT 1
- Snapshot adds imported module's name that fails match with reference shapshot
- Deadlock in inline snapshot testing HOT 4
- What's the way to use `assertSnapshot` in async test? HOT 3
- How to snapshot on special iOS version? HOT 1
- Optimizing Image Handling in Swift Snapshot Testing
- Snapshot of table view with combine receiver happens too late HOT 1
- swift-syntax 510.0.0 update not possible HOT 1
- How to generate iPhone 15 Snapshots with Xcode 15, as view.swift doesn't contain those dimensions HOT 1
- I get "Process completed with exit code 65" when I use "assertSnapshot(of: vc, as: .image)" function on GitHub Actions.
- `diffTool` have a Swift 6 warning on Xcode 15.3 with Strict Concurrency Checking set to Complete HOT 3
- Privacy manifest for AppStore releases HOT 1
- "The file “...” couldn’t be opened because you don’t have permission to view it" after switching branch
- Privacy manifest file / Privacy Rules HOT 1
- Blank diff snapshot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-snapshot-testing.