question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[android] Uncaught Error: java.lang.String cannot be cast as java.lang.Boolean after bundle update

See original GitHub issue

Environment

  Expo CLI 2.10.1 environment info:
    System:
      OS: macOS 10.14.3
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.11.4 - ~/.nvm/versions/node/v8.11.4/bin/node
      Yarn: 1.13.0 - /usr/local/bin/yarn
      npm: 5.6.0 - ~/.nvm/versions/node/v8.11.4/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.1 AI-173.4720617
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      expo: 32.0.0 => 32.0.0
      react: 16.5.0 => 16.5.0
      react-native: https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz => 0.57.1
      react-navigation: 3.3.2 => 3.3.2
    npmGlobalPackages:
      expo-cli: 2.10.1

Update settings in app.json:

"updates": {
  "enabled": true,
  "checkAutomatically": "ON_ERROR_RECOVERY",
  "fallbackToCacheTimeout": 0
}

Steps to Reproduce

This problem has been very difficult to troubleshoot. It only occurs on Android and only after a new bundle update has been pushed. It has been plaguing us since SDK v28.

We are using Updates.checkForUpdateAsync() to check for updates and use Updates.fetchUpdateAsync() to fetch new updates, if available. After the update has been downloaded, we show an alert with a button using Updates.reloadFromCache().

I have been publishing under a different account (and monitoring network traffic with mitmproxy) with a custom build of the app in the hope that I would be able to spot something funky (corrupt bundle, empty manifest etc). I was unable to get this error condition. It just happens when it happens…

We also have Fabric and Sentry enabled, both of which do not give any information about this crash.

The real problem here is that there is some vital information missing from the error that Expo is returning. If at least there would be some way of getting more info then we at least would know where to look.

I also posted to the forum (no replies yet): https://forums.expo.io/t/uncaught-error-java-lang-string-cannot-be-cast-to-java-lang-boolean-after-publish/20588. I also tried to join the Slack channel, but I didn’t receive the invite for some reason.

If anyone could point me in the right direction to troubleshoot, that would be very much appreciated!

Expected Behavior

Reloading the app after an update should work.

Actual Behavior

2LnxR

The app needs to be completely reinstalled for it to work again.

Reproducible Demo

Since this app has been ejected to Expokit it is not possible to create a reproducible demo.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
thiemo--bleekencommented, Mar 16, 2020

Same for me. Not working in emulator and on android devices. iOS is not showing this error

0reactions
tsapetacommented, Jun 30, 2020

SDK32 and ExpoKit are no longer supported so I’m closing this issue. I recommend migrating to bare workflow instead of using ExpoKit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Preference cannot cast java.lang.boolean to String
Upon calling addPreferencesFromResource() , Android only throws the unhelpful error that it can't convert a string to a boolean. – Joe Lapp. Jan ......
Read more >
java.lang.string cannot be cast to java.lang.boolean react native
Oracle Commerce Cloud Service - Version 21.1.1 and later: "java.lang.Boolean cannot be cast to java.lang.String" When Trying To Create New Audience ... " ......
Read more >
java.lang.String cannot be cast to oracle.apps.ar.creditmgt ...
String cannot be cast to oracle.apps.ar.creditmgt.application.server.creditRequestsEOImpl' Error when Case Folder is Updated with Financial Data ...
Read more >
Java Software Errors: How to Avoid 50 Code Issues in Java
We've rounded up 50 of the most common Java software errors, complete with code examples and ... operator < cannot be applied to...
Read more >
Context | Android Developers
Use with getSystemService(java.lang.String) to ... String) to retrieve a LocationManager for controlling location updates. ... This value cannot be null .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found