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

bug: Strange behavior on iPadOS on first update after Install #490

Open
michael-maenner opened this issue Nov 27, 2024 · 8 comments
Open

Comments

@michael-maenner
Copy link

Bug Report

Capacitor Version

  @capacitor/cli: 6.1.2
  @capacitor/android: 6.1.2
  @capacitor/core: 6.1.2
  @capacitor/ios: 6.1.2

Plugin Version

β–²   πŸ’Š   Capgo Doctor  πŸ’Š
β”‚
●   App Name: ***
β”‚
●   App ID: ***
β”‚
●   App Version: 1.0.0
β”‚
●   Web Dir: www
β”‚
●   OS: darwin Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:00 PDT 2024; root:xnu-10063.141.2~1/RELEASE_X86_64
β”‚
●   Node: v18.19.1
β”‚
●   Installed Dependencies:
β”‚
●     @capgo/cli: 4.26.4
β”‚
β—‡  Latest Dependencies:
β”‚
●     @capgo/cli: 4.26.4
β”‚
β—†  βœ… All dependencies are up to date

context(s)

ManualModel: true
AutoMode: false
CapgoCloud: false
OnPremise: true

Platform(s)

  • iPad OS

Current Behavior

We can reproduce the following problem on all tested iPads:

  1. the app is installed on the device
  2. the user enters his access data
  3. the update check is running
  4. the update is installed
  5. the application runs in a white screen and no Angular code is executed
  6. after the application has been completely terminated and restarted, everything works and the correct update has also been installed.

Expected Behavior

The desired behavior would be, as on all other devices, that the update is installed correctly without the application running into a white screen

Code Reproduction

Other Technical Details

npm --version output: 10.2.4

node --version output: v18.19.1

pod --version output (iOS issues only): 1.15.2

Additional Context

The log in XCode does not show any errors.
Likewise, no errors are logged in our application's own log.

If we access the application via the Safari inspector before or while the update is being installed and β€œinspect” the application via this, the error no longer occurs and the update is installed correctly. (γƒŽΰ² η›Šΰ² )γƒŽε½‘β”»β”β”»

We were able to reproduce the problem on both iPadOS 17 and 18.
On iPhones, everything works as desired.
Android does not cause any problems either (both phone and tablet)

If further updates are subsequently installed, the problem also no longer occurs.

It really only affects the applications that are downloaded from the store and an update is installed directly. Of course, this puts our application in a bad light if the user receives a white screen directly.
I should add that most of our users are using iPads or android tablets.

@riderx
Copy link
Collaborator

riderx commented Dec 5, 2024

thanks for the report we will look into it this week with @WcaleNieWolny

@WcaleNieWolny
Copy link
Contributor

@michael-maenner does this happen in production apps (released via testflight or app store) or are you just using xcode and pushing the app to the ipad via xcode?

Frankly, I have only ever used iPads and simulators during the plugin development on iOS. I have ALWAYS experienced the same behavior, but frankly I have never investigated it further.

I also once asked Martin about this (he uses an iPhone for development)
image

Based on what he said, I decided to be patient. I waited, and waited, and waited... and after like a minute or a bit more the screen would USUALLY go away on its own. I think that when developing on an iPad patience is a virtue.

I wish I had some better advise for you.

@riderx
Copy link
Collaborator

riderx commented Dec 7, 2024

that different i believe. In dev booting the app is always slow and even slower since last ios version versions but in prod mod it shouldn’t.

@WcaleNieWolny
Copy link
Contributor

@michael-maenner does this issue happen during development only or also in production (when downloaded via the app store)

@michael-maenner
Copy link
Author

The problem occurs both in Development and Production mode (testflight).
(Sometimes it works in production mode, but I can't identify any pattern as to when and why.)

I've been looking at several white screens for about 30 minutes now without anything happening (no events are being logged either).

If I completely close the app and reopen it, the correct version is loaded and displayed immediately.

Develop Log:

✨  Capacitor-updater: Stats sent for download_70, version 2.80.25
✨  Capacitor-updater: Stats sent for download_80, version 2.80.25
✨  Capacitor-updater: Stats sent for download_90, version 2.80.25
✨  Capacitor-updater: Stats sent for download_complete, version 2.80.25
✨  Capacitor-updater: Stats sent for set, version 2.80.25
✨  Capacitor-updater: Current bundle is: { "id": "zWUqwNwgjE", "version": "2.80.25", "downloaded": "2024-12-09T08:00:07.524Z", "checksum": "cf5d3777", "status": "success"}
✨  Capacitor-updater: notifyAppReady was called. This is fine: { "id": "zWUqwNwgjE", "version": "2.80.25", "downloaded": "2024-12-09T08:00:07.524Z", "checksum": "cf5d3777", "status": "success"}

Our update package, which is downloaded, is about 90MB in size.

@WcaleNieWolny
Copy link
Contributor

During the blank screen, can you see Capacitor-updater: semaphoreWait 0 being logged in the console?

@michael-maenner
Copy link
Author

michael-maenner commented Dec 10, 2024

Yes, semaphoreWait 0 is logged.

Below is the complete "Capacitor-Updater" log.

✨  Capacitor-updater: semaphoreWait 0
✨  Capacitor-updater: init for device 73B01516-4B9A-426F-9719-63AC678CE944
✨  Capacitor-updater: version native 2.80.191
✨  Capacitor-updater: appId de.xxx
✨  Capacitor-updater: Initial load builtin
✨  Capacitor-updater: Auto update is disabled
✨  Capacitor-updater: sendReadyToJs
✨  Capacitor-updater: Wait for 10000 ms, then check for notifyAppReady
✨  Capacitor-updater: semaphoreWait 10000
✨  Capacitor-updater: Setting status for bundle [builtin] to SUCCESS
✨  Capacitor-updater: Not saving info for bundle [builtin] { "id": "builtin", "version": "builtin", "downloaded": "1970-01-01T00:00:00.000Z", "checksum": "", "status": "success"}
✨  Capacitor-updater: Fallback bundle is: { "id": "builtin", "version": "builtin", "downloaded": "1970-01-01T00:00:00.000Z", "checksum": "", "status": "success"}
✨  Capacitor-updater: Version successfully loaded: { "id": "builtin", "version": "builtin", "downloaded": "1970-01-01T00:00:00.000Z", "checksum": "", "status": "success"}
✨  Capacitor-updater: Current bundle loaded successfully. ['notifyAppReady()' was called] { "id": "builtin", "version": "builtin", "downloaded": "1970-01-01T00:00:00.000Z", "checksum": "", "status": "success"}
✨  Capacitor-updater: Stats sent for app_moved_to_foreground, version builtin
✨  Capacitor-updater: Built-in bundle is active. We skip the check for notifyAppReady.
✨  Capacitor-updater: Downloading Optional(https://xxx/Version_2.80.25.zip)
✨  Capacitor-updater: Failed to parse info for bundle [qGU1azfdkW] No data object found for the given key
✨  Capacitor-updater: Storing info for bundle [qGU1azfdkW] { "id": "qGU1azfdkW", "version": "2.80.25", "downloaded": "2024-12-10T08:03:35.284Z", "checksum": "", "status": "downloading"}
✨  Capacitor-updater: Stats sent for download_0, version builtin
✨  Capacitor-updater: Stats sent for download_10, version 2.80.25
✨  Capacitor-updater: Stats sent for download_20, version 2.80.25
✨  Capacitor-updater: Stats sent for download_30, version 2.80.25
✨  Capacitor-updater: Stats sent for download_40, version 2.80.25
✨  Capacitor-updater: Stats sent for download_50, version 2.80.25
✨  Capacitor-updater: Stats sent for download_60, version 2.80.25
✨  Capacitor-updater: Download complete, total received bytes: 90006585
✨  Capacitor-updater: Cannot find public key or sessionKey
✨  Capacitor-updater: Downloading: 80% (unzipping)
✨  Capacitor-updater: Stats sent for download_70, version 2.80.25
✨  Capacitor-updater: Downloading: 90% (wrapping up)
✨  Capacitor-updater: Storing info for bundle [qGU1azfdkW] { "id": "qGU1azfdkW", "version": "2.80.25", "downloaded": "2024-12-10T08:04:23.124Z", "checksum": "cf5d3777", "status": "pending"}
✨  Capacitor-updater: Downloading: 100% (complete)
✨  Capacitor-updater: Good checksum cf5d3777 
✨  Capacitor-updater: Current bundle set to: /var/mobile/Containers/Data/Application/FB45C6A1-CCCE-4BB2-A978-17CF986C8695/Library/NoCloud/ionic_built_snapshots/qGU1azfdkW
✨  Capacitor-updater: Setting status for bundle [qGU1azfdkW] to PENDING
✨  Capacitor-updater: Storing info for bundle [qGU1azfdkW] { "id": "qGU1azfdkW", "version": "2.80.25", "downloaded": "2024-12-10T08:04:23.124Z", "checksum": "cf5d3777", "status": "pending"}
✨  Capacitor-updater: Set active bundle: qGU1azfdkW
✨  Capacitor-updater: semaphoreWait 0
✨  Capacitor-updater: Reloading qGU1azfdkW
✨  Capacitor-updater: Wait for 10000 ms, then check for notifyAppReady
✨  Capacitor-updater: Setting status for bundle [qGU1azfdkW] to SUCCESS
✨  Capacitor-updater: Storing info for bundle [qGU1azfdkW] { "id": "qGU1azfdkW", "version": "2.80.25", "downloaded": "2024-12-10T08:04:23.124Z", "checksum": "cf5d3777", "status": "success"}
✨  Capacitor-updater: Fallback bundle is: { "id": "builtin", "version": "builtin", "downloaded": "1970-01-01T00:00:00.000Z", "checksum": "", "status": "success"}
✨  Capacitor-updater: Version successfully loaded: { "id": "qGU1azfdkW", "version": "2.80.25", "downloaded": "2024-12-10T08:04:23.124Z", "checksum": "cf5d3777", "status": "pending"}
✨  Capacitor-updater: Current bundle loaded successfully. ['notifyAppReady()' was called] { "id": "qGU1azfdkW", "version": "2.80.25", "downloaded": "2024-12-10T08:04:23.124Z", "checksum": "cf5d3777", "status": "pending"}
✨  Capacitor-updater: Stats sent for download_70, version 2.80.25
✨  Capacitor-updater: Stats sent for download_80, version 2.80.25
✨  Capacitor-updater: Stats sent for download_90, version 2.80.25
✨  Capacitor-updater: Stats sent for download_complete, version 2.80.25
✨  Capacitor-updater: Stats sent for set, version 2.80.25
✨  Capacitor-updater: Current bundle is: { "id": "qGU1azfdkW", "version": "2.80.25", "downloaded": "2024-12-10T08:04:23.124Z", "checksum": "cf5d3777", "status": "success"}
✨  Capacitor-updater: notifyAppReady was called. This is fine: { "id": "qGU1azfdkW", "version": "2.80.25", "downloaded": "2024-12-10T08:04:23.124Z", "checksum": "cf5d3777", "status": "success"}

@riderx
Copy link
Collaborator

riderx commented Dec 30, 2024

I just tried again with my iPad and in manual mode or auto mode I don't see any issue with plugin 6.7.7
Can you test again and do a screen record of the ipad?

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

3 participants