Code Monkey home page Code Monkey logo

Comments (13)

stephencelis avatar stephencelis commented on July 30, 2024

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.

upeugene avatar upeugene commented on July 30, 2024

@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.

stephencelis avatar stephencelis commented on July 30, 2024

@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.

upeugene avatar upeugene commented on July 30, 2024

@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.

stephencelis avatar stephencelis commented on July 30, 2024

Hey @Hoppus. Someone else reported the issue here:

CocoaPods/CocoaPods#8318

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.

upeugene avatar upeugene commented on July 30, 2024

I still don't know how to fix it

screen shot 2019-01-09 at 2 02 50 pm
screen shot 2019-01-09 at 2 02 00 pm

If someone could help it would be really nice.

from swift-snapshot-testing.

upeugene avatar upeugene commented on July 30, 2024

I just created new file and it started to work 🤔😩

from swift-snapshot-testing.

alexito4 avatar alexito4 commented on July 30, 2024

@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.

klein-thibault avatar klein-thibault commented on July 30, 2024

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.

upeugene avatar upeugene commented on July 30, 2024

I just recreated test file, and the issue was gone

from swift-snapshot-testing.

klein-thibault avatar klein-thibault commented on July 30, 2024

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.

klein-thibault avatar klein-thibault commented on July 30, 2024

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.

mikhailokarpenko avatar mikhailokarpenko commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.