Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Android release build error on v1.1.14 RNMixpanel.sharedInstanceWithToken got 3 arguments, expected 4 #218

Open
matt-dalton opened this issue Jan 22, 2020 · 7 comments

Comments

@matt-dalton
Copy link

When I try and create a release build using react-native run-android --variant=release, the app builds successfully, but then when I open it on the simulator I get:

E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
    Process: com.finimize.myapp, PID: 23809
    com.facebook.react.bridge.NativeArgumentsParseException: RNMixpanel.sharedInstanceWithToken got 3 arguments, expected 4
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:348)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:150)
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:26)
        at android.os.Looper.loop(Looper.java:193)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:225)
        at java.lang.Thread.run(Thread.java:764)

Library version 1.1.14, RN version 0.61.5
The Android gradle dependency tells me I'm using this version com.mixpanel.android:mixpanel-android:5.6.8@aar

I've tested this on someone else's machine too and the same issue.

@JacquesBonet
Copy link

I have same problem.

@JacquesBonet
Copy link

Its ok in removing metro cache file

@enigmablue
Copy link

@matt-dalton how did you fix it ? if you have

@JacquesBonet
Copy link

you have a metro-cache directory under the tmp directory of your operating system.

Remove this metro-cache file and rebuid.

@ghasemikasra39
Copy link

TypeError: Mixpanel.sharedInstanceWithToken is not a function

@leotm
Copy link

leotm commented Jul 9, 2020

Same here upgrading from 1.1.1 to 1.2.0, going to downgrade, since I've have checked/followed these as far as I can tell

Debug-mode is not an issue, only release-mode builds too

RN 0.61.5 too


Screenshot 2020-07-09 at 19 43 35

@matt-dalton
Copy link
Author

@matt-dalton how did you fix it ? if you have

Sorry @enigmablue - didn't see this. I'm still having problems with it. It just only seems to affect release builds on my simulator, so have just been building on device until now.

you have a metro-cache directory under the tmp directory of your operating system.

Remove this metro-cache file and rebuid.

I tried this:
rm -rf $TMPDIR/metro-*

And rebuilt and it didn't seem to fix anything.

Has anyone else managed to work this out?

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants