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

fix: Issue with Black Screen on iOS After Hotfix Update Using Different Shorebird Versions #2667

Open
JedTsai33 opened this issue Dec 9, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@JedTsai33
Copy link

JedTsai33 commented Dec 9, 2024

App ID: 0201f7bd-11de-4ad3-af2b-d8b317cb1c33

Description

We are using GitHub to package the .ipa file and installing Shorebird via shorebirdtech/setup-shorebird@v1.

Previously, we released a version using Shorebird v1.4.1. Today, we attempted to publish a patch update using Shorebird v1.4.15. However, after the hotfix was applied, opening the app resulted in a black screen.

Through further testing, we found that:

If both the release and the patch are built with Shorebird v1.4.15, the hotfix works correctly without any issues.

Questions:

  1. Why does updating to a newer version of Shorebird cause the iOS app to display a black screen after a hotfix?
  2. Is it possible to let users control the Shorebird version during installation to avoid similar issues in the future?
@JedTsai33 JedTsai33 added the bug Something isn't working label Dec 9, 2024
@eseidel
Copy link
Contributor

eseidel commented Dec 9, 2024

I don't believe this has anything to do with the Shorebird version. (It's possible, but unlikely.) Shorebird always uses the exact Flutter matching the release when building a patch, regardless of Shorebird version.

But it does look like 7.100.5+710005 patch 5, had native changes, which easily could explain a black screen:

  "has_asset_changes": true,
  "has_native_changes": true,
  "release_platform": "ios",
  "used_ignore_asset_changes_flag": true,
  "used_ignore_native_changes_flag": true

I'd strongly recommend not ignoring native changes.
https://docs.shorebird.dev/troubleshooting/#i-see-a-your-app-contains-native-changes-warning-when-running-shorebird-patch-even-though-i-havent-changed-swiftobjective-ckotlinjava-code

The way that Shorebird works is that it replaces all the Dart code in your app. It does not change any of the "native" code (Obj-C/Swift/Kotlin/Dart/C++, etc.), so if you have changed native code and patch, you will end up running new Dart code with old "native" code, and thus can end up in a confused state. shorebird warns if this happens, but it looks like when these patches were made those warnings were overridden.

I've filed #2669 for displaying a warning about this in the console.

@eseidel
Copy link
Contributor

eseidel commented Dec 9, 2024

Can you share the command you used to build the patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants