rasmuslos / AmpFin

Native Jellyfin music player for iOS & iPadOS
Other
107 stars 10 forks source link

the ipa for release 1.1.0 is corrupt #11

Closed ptgms closed 5 months ago

ptgms commented 6 months ago

crashes on launch :(

ptgms commented 6 months ago

built the IPA myself - still crashes. probably something to do with changes made since 1.0.10.

PauFCB commented 6 months ago

Same here

rasmuslos commented 6 months ago

I have made some breaking database migrations, you have to uninstall the app to remove all data, then reinstalling it should work

ptgms commented 6 months ago

I have made some breaking database migrations, you have to uninstall the app to remove all data, then reinstalling it should work

I have done that. Still same issue.

rasmuslos commented 6 months ago

Can you try this build: https://github.com/rasmuslos/AmpFin/releases/tag/v1.1.1 if it does not work please run the app using Xcode and provide the crash logs

ptgms commented 6 months ago

Build still broken. It did compile and run when I used on emulator- didn't try my actual phone yet. Ill report back when I find time tomorrow

rasmuslos commented 6 months ago

The app crashed for me after installing the internal TestFlight build after manually installing it via Xcode. I think it is related to the Siri extensions being held in memory and preventing the app from starting properly. Restarting my device did fix it, can you try this, too?

ptgms commented 6 months ago

Restart didn't work

rasmuslos commented 6 months ago

Please try this version, I fixed some bugs where SwiftData operations happened on the wrong thread. Apparently this is not a problem when debugging the executable

ptgms commented 6 months ago

I still have crashes :(

rasmuslos commented 6 months ago

How does the app crash? Is the app (login / library / etc.) visible before it crashes or does the app not even launch? And what tool are you using for side loading (AltStore / Sideloady / Sidestore / Xcode / ...)?

ptgms commented 6 months ago

I sideloaded using appdb. The app has no view visible - it opens - the view is blurred/black, it's gone. Nothing seems to load.

rasmuslos commented 6 months ago

Then this bug is most likely caused by appdb. There is some code to make app groups work for AltStore and its derivates (like Sidestore), but not for any other side loading alternatives. Most apps don't require app groups because they only store UserDefaults data in them, if the app group does not exists this seems to fail silently and just use the default store. The problem is, that this app also stores its SwiftData database in the app group to allow stuff like Siri Intents to work. I tried to find out how appdb creates their app groups, but I could only find a dead link and as the app is closed source there isn't really anything I can do here... Moving the database out of the app group would block a lot of upcoming functionality (Widgets, Siri Intents, etc.), so it isn't really an option. I would suggest using AltStore / Sidestore / etc. to side load or to wait for the AppStore release.

ptgms commented 6 months ago

Still crashing

PauFCB commented 6 months ago

In my case I tried with AltStore and the app let me put my credentials and then closes and I can't open again. Tried restarting edit: last working version for mi it's v1.1.0. The last one without Siri support if it helps.

rasmuslos commented 6 months ago

Did you uninstall version 1.1.0 before installing the newest one? I don't think I have made any changes (not including ones related to the database) that could cause a crash

PauFCB commented 6 months ago

Did you uninstall version 1.1.0 before installing the newest one? I don't think I have made any changes (not including ones related to the database) that could cause a crash

Yes, I uninstalled first. Hope that soon we can test the app on Testflight 🙏🏻

rasmuslos commented 6 months ago

This should be fixed here: https://github.com/rasmuslos/AmpFin/releases/tag/v1.2.2 The app group is now disabled, so please strip app extensions, they will not work as intended

PauFCB commented 6 months ago

still crashing with AltStore, this time don't even opens :(

rasmuslos commented 6 months ago

I am running out of ideas, the only thing that I can think of that could be the cause is the Siri entitlement, I will provide a build without it later.

And just to clarify, the new build should work with all side loading tools, not just AltStore

PauFCB commented 6 months ago

Thanks for your work. Yes, tried with AltStore, SideStore and with Scarlet. And also with Apple Configurator 2 that can't even install it. The other ones installs the app but can't open.

rasmuslos commented 6 months ago

Please try this version: AmpFin.ipa.zip

rasmuslos commented 6 months ago

This looks a lot like iOS terminating the app because something is wrong with the code signing. The problem is that I cannot say for sure or find out what the error is. I removed all app extensions for this, so can you please try this one: AmpFin.ipa.zip Make sure tu uninstall the app beforehand, just to be sure

rasmuslos commented 6 months ago

I am pretty sure that the behavior in v1.1.0 is caused by SwiftData because it it only initialized once you log in. I have one last idea, removing the intent may work... It is about the only change from v1.1.0 to v1.1.1 that could have an impact. If this does not do the trick I have no idea what could cause this. AmpFin.ipa.zip

PauFCB commented 6 months ago

No.. sorry. Still not open. Let me know if you need to try more things. Thanks

rasmuslos commented 6 months ago

I will, but I have ran out of ideas, so you will have to wait, sorry

And just to clarify: version 1.1.0 works fine and the pre-release 1.1.1 does not anymore?

PauFCB commented 6 months ago

I will, but I have ran out of ideas, so you will have to wait, sorry

And just to clarify: version 1.1.0 works fine and the pre-release 1.1.1 does not anymore?

Sorry if i say the numbers wrong, but the last version without issues opening that I can install with all the sideload apps (AltStore,Scarlet, etc) is the last one called Music.ipa. The versions called AmpFin.ipa and beyond have problems like crashing or, in the best case, put the credentials.

rasmuslos commented 6 months ago

So the last working version is v1.0.10 and it stopped working in v1.1.0?

PauFCB commented 6 months ago

So the last working version is v1.0.10 and it stopped working in v1.1.0?

Yes. 1.0.10 works well and 1.1.0 can be installed with AltStore but only for credentials (note that once open well and let me navigate into the Playlists section but only show the Playlists name, not any song even refreshing, but this only happens once, the rest closes when I try to open). Beyond versions don't let me open. (Excuse me for my English).

rasmuslos commented 6 months ago

So v1.1.0 does not crash when opening, only when navigating to something other then playlists? What version of the server are you using?

PauFCB commented 6 months ago

So v1.1.0 does not crash when opening, only when navigating to something other then playlists? What version of the server are you using?

1.1.0 can only be opened if I install it with AltStore while previous versions it doesn't matter which side load app I use for. For example, If I install 1.1.0 using Scarlet, the app doesn't open. But if install it with AltStore, I can open the app and even use it normally, but in the playlist section, it only appears the total number and duration of the playlist, but can't see the name of the songs and the cover of each playlists and if I click the play/shuffle nothing happens. Is for this issue that I prefer to use the 1.0.10 version whit Scarlet (and for no need a PC). Beyond versions I tried everything but crashes and can't open. I use the latest server image on Synology Docker container.

rasmuslos commented 5 months ago

Well then it seems like there were multiple issues. The crash in v1.1.0 with scarlet is expected, the playlist thing not. I guess the Siri entitlement is causing the crash in v1.1.1 and above, but if the other releases did not work either, I have no clue what could cause the crash. I have also no way of knowing if it works for other people so I really have no idea on what to do, sorry

PauFCB commented 5 months ago

Hope more people can test and find the errors.

rasmuslos commented 5 months ago

So it seems like the crash also occurred in ShelfPlayer (https://github.com/rasmuslos/ShelfPlayer/issues/20), and luckily we were able to find its cause. I will provide a fix soon

rasmuslos commented 5 months ago

Please try this version: https://github.com/rasmuslos/AmpFin/releases/tag/v1.2.3

PauFCB commented 5 months ago

Working! The playlist section still don't work properly when you open one but the app don't crash and it's usable. Just sometimes I have to click two or three times on a song to start playing, but the play buttons work at first try. Thanks IMG_2654

rasmuslos commented 5 months ago

The playlist thing is a separate issue, please open another one. Can you also include some information about the playlist there, like if there are any other media types (other than tracks) in it