4np / TVGemist

An *Unofficial* Uitzending Gemist application for  TV
Apache License 2.0
22 stars 4 forks source link

App doesn't start #10

Closed technimad closed 6 years ago

technimad commented 6 years ago

Short description of the issue

App doesn't start, crashes.

Issue type

Bug

What is the expected behaviour?

App starts, no crash

What is actually happening?

When trying to start the app from Xcode on a appleTV4 via a remote debug session, the app doesn't start, it crashes. I was also able the reproduce the behavior with the appleTV simulator, but not consistent.

Log in debug window: `dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib Referenced from: /var/containers/Bundle/Application/EF3FD657-E27B-4977-A079-B71F704D368D/TVGemist.app/TVGemist Reason: no suitable image found. Did find: /private/var/containers/Bundle/Application/EF3FD657-E27B-4977-A079-B71F704D368D/TVGemist.app/Frameworks/libswiftAVFoundation.dylib: code signature invalid for '/private/var/containers/Bundle/Application/EF3FD657-E27B-4977-A079-B71F704D368D/TVGemist.app/Frameworks/libswiftAVFoundation.dylib'

/private/var/containers/Bundle/Application/EF3FD657-E27B-4977-A079-B71F704D368D/TVGemist.app/Frameworks/libswiftAVFoundation.dylib: code signature invalid for '/private/var/containers/Bundle/Application/EF3FD657-E27B-4977-A079-B71F704D368D/TVGemist.app/Frameworks/libswiftAVFoundation.dylib'

/private/var/containers/Bundle/Application/EF3FD657-E27B-4977-A079-B71F704D368D/TVGemist.app/Frameworks/libswiftAVFoundation.dylib: stat() failed with errno=1
/private/var/containers/Bundle/Application/EF3FD657-E27B-4977-A079-B71F704D368D/TVGemist.app/Frameworks/libswiftAVFoundation.dylib: code signature invalid for '/private/var/containers/Bundle/Application/EF3FD657-E27B-4977-A079-B71F704D368D/TVGemist.app/Frameworks/libswiftAVFoundation.dylib'

/private/var/containers/Bundle/Application/EF3FD657-E27B-4977-A079-B71F704D368D/TVGemist.app/Frameworks/libswiftAVFoundation.dylib: stat() failed with errno=1`

Steps to reproduce

Get latest code from GitHub, follow installation instructions, (change team, app id), press play button.

Extra information

Version you are using: 0.0.5

tvOS version: most recent, no updates available

Xcode version: 9.4

4np commented 6 years ago

I can't reproduce the issue. I suspect this might be related to the NPO API's not responding, or responding with some invalid or missing JSON values. I have seen the NPO change their response a couple of times, which would break the abstraction, but I can't reproduce the issue you're describing at the moment. Is it working for you now?

technimad commented 6 years ago

Nope not working. I got an update of Xcode to 9.4.1 today and I was now able to create a screenshot of the error:

schermafbeelding 2018-06-13 om 21 06 03

This happens right after the app starts, before the home screen of the app is displayed.

4np commented 6 years ago

I am not fluent in assembly and the stack trace is pretty much non-existent. It looks like that the Swift libraries cannot be loaded, but that sounds a bit like an Apple bug to me.

I do sometimes experience a crash after the first start (which I thought might be caused by the logging framework), but the second start always works. I can't reproduce it consistently crashing all the time.

You could try clearing out your derived data and see if that helps? I use this bash method:

# clean derived data
cdd() {
    while true; do 
        if [ -d "~/Library/Developer/Xcode/DerivedData" ]; then
            rm -rf "~/Library/Developer/Xcode/DerivedData"
        else
            echo ".removed derived data"
            break
        fi
    done
}

But you could also close Xcode and run rm -rf "~/Library/Developer/Xcode/DerivedData" from Terminal. Alternatively try ⌘-shift-k within Xcode.

technimad commented 6 years ago

⌘-shift-k in Xcode fixed the issue. Thanks.

4np commented 6 years ago

Good to hear 👍