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

Error after upgrade to 0.12.0 #3344

Closed
Pajn opened this issue Oct 11, 2015 · 6 comments
Closed

Error after upgrade to 0.12.0 #3344

Pajn opened this issue Oct 11, 2015 · 6 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@Pajn
Copy link
Contributor

Pajn commented Oct 11, 2015

After upgrade I got the same error as anyone else (Android), but after changing the dependency in build.gradle to 0.12 and running react-native run-android I got

10-11 21:55:44.998  5656  5656 E unknown:React: Exception in native call from JS
10-11 21:55:44.998  5656  5656 E unknown:React: com.facebook.react.bridge.UnexpectedNativeTypeException: TypeError: expected dynamic type `int64', but had type `string'
10-11 21:55:44.998  5656  5656 E unknown:React:     at com.facebook.react.bridge.ReadableNativeMap.getInt(Native Method)
10-11 21:55:44.998  5656  5656 E unknown:React:     at com.facebook.react.views.view.ReactDrawableHelper.createDrawableFromJSDescription(ReactDrawableHelper.java:66)
10-11 21:55:44.998  5656  5656 E unknown:React:     at com.facebook.react.views.view.ReactViewManager.updateView(ReactViewManager.java:137)
10-11 21:55:44.998  5656  5656 E unknown:React:     at com.facebook.react.views.view.ReactViewManager.updateView(ReactViewManager.java:40)
10-11 21:55:44.998  5656  5656 E unknown:React:     at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:53)
10-11 21:55:44.998  5656  5656 E unknown:React:     at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:182)
10-11 21:55:44.998  5656  5656 E unknown:React:     at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:137)
10-11 21:55:44.998  5656  5656 E unknown:React:     at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:574)
10-11 21:55:44.998  5656  5656 E unknown:React:     at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:622)
10-11 21:55:44.998  5656  5656 E unknown:React:     at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32)
10-11 21:55:44.998  5656  5656 E unknown:React:     at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:114)
10-11 21:55:44.998  5656  5656 E unknown:React:     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
10-11 21:55:44.998  5656  5656 E unknown:React:     at android.view.Choreographer.doCallbacks(Choreographer.java:670)
10-11 21:55:44.998  5656  5656 E unknown:React:     at android.view.Choreographer.doFrame(Choreographer.java:603)
10-11 21:55:44.998  5656  5656 E unknown:React:     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
10-11 21:55:44.998  5656  5656 E unknown:React:     at android.os.Handler.handleCallback(Handler.java:739)
10-11 21:55:44.998  5656  5656 E unknown:React:     at android.os.Handler.dispatchMessage(Handler.java:95)
10-11 21:55:44.998  5656  5656 E unknown:React:     at android.os.Looper.loop(Looper.java:148)
10-11 21:55:44.998  5656  5656 E unknown:React:     at android.app.ActivityThread.main(ActivityThread.java:5417)
10-11 21:55:44.998  5656  5656 E unknown:React:     at java.lang.reflect.Method.invoke(Native Method)
10-11 21:55:44.998  5656  5656 E unknown:React:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-11 21:55:44.998  5656  5656 E unknown:React:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
@Pajn Pajn changed the title Error after opgrade to 0.12.0 Error after upgrade to 0.12.0 Oct 11, 2015
@mkonicek
Copy link
Contributor

When upgrading to 0.12, you need to update the JS version in package.json and Android artifacts version in build.gradle. This is not obvious, we either need the JS to be able to detect the Android artifacts are old, or release the Android artifacts to npm along with the JS.

@Pajn
Copy link
Contributor Author

Pajn commented Oct 12, 2015

This is another issue. As I said I did update the build.gradle. If I don't I get the exception TypeError: expected dynamic type 'string', but had type 'int64 but after I update build.gradle I get TypeError: expected dynamic type 'int64', but had type 'string'.

Notice that it's a different exception (the types are reversed) and is thrown from a different place.

@Pajn
Copy link
Contributor Author

Pajn commented Oct 12, 2015

I found the error to be in TouchableNativeFeedback. If I remove the usage of that from the app it works.

@javamonn
Copy link

+1, I encountered this same error after updating the react-native version in build.gradle and package.json. Fix for me (after reading @Pajn's note) was to update the underlayColor prop of TouchableHighlight to use the int representation of a hex string instead of passing the hex string in directly, which worked fine on 0.11.0.

<TouchableHighlight underlayColor={parseInt('#000000'.slice(1), 16)} />

I assume a similar fix would work for TouchableNativeFeedback.

update: still encountering a somewhat related issue when trying to inspect TouchableHiglight elements on Android (using the above workaround to get the app to run at all), crashes the app with the following stack trace:

TypeError: expected dynamic type 'int64' but had type 'double'

I'll try digging through and finding the problem commit when I get a chance tonight.

@Pajn
Copy link
Contributor Author

Pajn commented Oct 12, 2015

@javamonn Thank you for your fix, will try it tomorrow! :)

@cosmith
Copy link
Contributor

cosmith commented Oct 20, 2015

I have this same issue and I don't use TouchableHighlight or TouchableNativeFeedback. I'm downgrading to 0.11.4 for now cause I'm not sure where to look for a fix.

@facebook facebook locked as resolved and limited conversation to collaborators Jul 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants