Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Our App with capacitor-updater crashes #108

Closed
colenso opened this issue Sep 23, 2022 · 14 comments
Closed

Our App with capacitor-updater crashes #108

colenso opened this issue Sep 23, 2022 · 14 comments

Comments

@colenso
Copy link

colenso commented Sep 23, 2022

Not able to replicate this on demand but it has been happening to our users since last week and just happened to one of our team members today.
User is using a iPhone 13 Pro has been using the app just fine. I think an OTA update installed at around 5 PM today and when he tried to use the app again saw a white screen and couldn't do anything with the app. Then when he force quite the app wasn't starting again.

@riderx
Copy link
Collaborator

riderx commented Sep 26, 2022

Thanks for taking the time to open the issue.
I'm able to reproduce the issue after playing a lot with the network and killing the app.
Around 30/40 times and I got it.
I have no easy reproduction, and even when I reproduce it's only in production, so my logs are very limited.
For now, I have no clue where this come from, but I continue searching.
Meanwhile, I released update to disable update on platform if you want to avoid it completely.

@ghost
Copy link

ghost commented Sep 28, 2022

@riderx I think it's related to the ios issue of my pull request (#106).
killing the app the first time seems not to change the current bundle (even if the getBundleInfo function returns the new version code). However, if the previous bundle isn't builtin after the installation, it is deleted. So the app tries to get deleted bundle files and crashes

@ghost ghost mentioned this issue Sep 28, 2022
@riderx
Copy link
Collaborator

riderx commented Oct 5, 2022

@luca-sharryland did you saw he issue happen again after the merge of your PR, @colenso did you check ?

@ghost
Copy link

ghost commented Oct 6, 2022

@riderx yes only in one case, probably not related to multi delay

@riderx riderx closed this as completed Oct 6, 2022
@ghost
Copy link

ghost commented Dec 5, 2022

@riderx unfortunately this bug is not solved. For the second time, it happens in our production app, always in ios.

@riderx riderx reopened this Dec 6, 2022
@riderx
Copy link
Collaborator

riderx commented Dec 6, 2022

Did you receive logs in Xcode about that issue?

@ghost
Copy link

ghost commented Dec 6, 2022

Did you receive logs in Xcode about that issue?

No, I've received feedback from a collaborator that was using the production app

@ghost
Copy link

ghost commented Jan 25, 2023

@riderx any news for this?

@riderx
Copy link
Collaborator

riderx commented Jan 25, 2023

@luca-sharryland I need logs to understand the issue, I don't have a way to reproduce. All the apps I have in production have a very low crash rate, so I don't know where that can comes from

@ghost
Copy link

ghost commented Jan 26, 2023

@luca-sharryland i need logs to understand the issue, I don't have a way to reproduce. all the apps I have in production have very log crash rate, so i don't know where that can come from

there's a way we can save plugin error logs from our app? so we can investigate

@riderx
Copy link
Collaborator

riderx commented Feb 14, 2023

@luca-peruzzo you can get them here : https://developer.apple.com/news/?id=nra79npr

@luca-peruzzo
Copy link
Contributor

@luca-peruzzo you can get them here : https://developer.apple.com/news/?id=nra79npr

I know how to view crash reports, but the only one I have is not comprehensive
image

@sethrevelle
Copy link

I am experiencing this issue as well, where intermittently an app will fail crash immediately after launch once an update is pushed. I pulled following information from xCode when iPad was in this state, I am not sure if it is helpful.

✨ Capacitor-updater: init for device XXX
✨ Capacitor-updater: Getting info for bundle [n73LWaHKYG]
✨ Capacitor-updater: Returning info bundle [{ "id": "n73LWaHKYG", "version": "1.0.413", "downloaded": "2023-06-28T11:22:32.634Z", "checksum": "00b5cfdf", "status": "pending"}]
✨ Capacitor-updater: Getting info for bundle [n73LWaHKYG]
✨ Capacitor-updater: Returning info bundle [{ "id": "n73LWaHKYG", "version": "1.0.413", "downloaded": "2023-06-28T11:22:32.634Z", "checksum": "00b5cfdf", "status": "pending"}]
✨ Capacitor-updater: Wait for 10000 ms, then check for notifyAppReady
✨ Capacitor-updater: Check for update via https://api.capgo.app/updates
✨ Capacitor-updater: Getting info for bundle [n73LWaHKYG]
✨ Capacitor-updater: Returning info bundle [{ "id": "n73LWaHKYG", "version": "1.0.413", "downloaded": "2023-06-28T11:22:32.634Z", "checksum": "00b5cfdf", "status": "pending"}]
✨ Capacitor-updater: Auto-update parameters: InfoObject(platform: Optional("ios"), device_id: Optional("XXX"), app_id: Optional("yyy"), custom_id: Optional(""), version_build: Optional("1.0"), version_code: Optional("1"), version_os: Optional("16.5.1"), version_name: Optional("1.0.413"), plugin_version: Optional("4.60.0"), is_emulator: Optional(false), is_prod: Optional(false), action: nil, channel: nil)
⚡️ ERROR: Unable to load /var/mobile/Containers/Data/Application/ZZZ/Library/NoCloud/ionic_built_snapshots/n73LWaHKYG
⚡️ This file is the root of your web app and must exist before
⚡️ Capacitor can run. Ensure you've run capacitor copy at least
⚡️ or, if embedding, that this directory exists as a resource directory.

riderx added a commit that referenced this issue Jul 14, 2023
@riderx
Copy link
Collaborator

riderx commented Jul 14, 2023

I still cannot reproduce, but i found a way to better verify if the folder and the file exist before set them, there a change to improve the issue, otherwise i need your help to find a way to reproduce the issue

@riderx riderx closed this as completed Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants