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.

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.razorTest.razorpayMe/host.exp.exponent.MainActivity}: java.lang.IllegalArgumentException: unexpected url

See original GitHub issue

I have an expo app ejected to use ExpoKit, where I have followed the steps listed here to get react-native-razorpay integrated. My app when run with Android Studio throws the following error stack:

01/29 23:15:30: Launching app
$ adb shell am start -n "com.razorTest.razorpayMe/host.exp.exponent.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Waiting for process to come online
Connected to process 15077 on device xiaomi-poco_f1-c169faef
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/AsyncCondition: Could not find listener for key: openOptimisticExperienceActivity
    Could not find listener for key: openExperienceActivity
D/SoLoader: init exiting
I/Timeline: Timeline: Activity_launch_request time:178999653
E/AppLoader: Error fetching cached manifest, falling back to default timeout: Could not load manifest. Are you sure this experience has been published?
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.razorTest.razorpayMe, PID: 15077
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.razorTest.razorpayMe/host.exp.exponent.MainActivity}: java.lang.IllegalArgumentException: unexpected url: http:
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2946)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:201)
        at android.app.ActivityThread.main(ActivityThread.java:6806)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
     Caused by: java.lang.IllegalArgumentException: unexpected url: http:
        at expolib_v1.okhttp3.Request$Builder.url(Request.java:142)
        at host.exp.exponent.kernel.ExponentUrls.addExponentHeadersToUrl(ExponentUrls.java:45)
        at host.exp.exponent.kernel.ExponentUrls.addExponentHeadersToManifestUrl(ExponentUrls.java:57)
        at host.exp.exponent.ExponentManifest.fetchManifest(ExponentManifest.java:212)
        at host.exp.exponent.ExponentManifest.fetchManifest(ExponentManifest.java:196)
        at host.exp.exponent.AppLoader.fetchRemoteManifest(AppLoader.java:193)
        at host.exp.exponent.AppLoader.startTimerAndFetchRemoteManifest(AppLoader.java:189)
        at host.exp.exponent.AppLoader.startTimerAndFetchRemoteManifest(AppLoader.java:183)
        at host.exp.exponent.AppLoader.access$800(AppLoader.java:20)
        at host.exp.exponent.AppLoader$3.onError(AppLoader.java:160)
        at host.exp.exponent.ExponentManifest.fetchCachedManifest(ExponentManifest.java:288)
        at host.exp.exponent.AppLoader.start(AppLoader.java:91)
        at host.exp.exponent.experience.DetachActivity.onCreate(DetachActivity.java:96)
        at android.app.Activity.performCreate(Activity.java:7210)
        at android.app.Activity.performCreate(Activity.java:7201)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2926)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:201) 
        at android.app.ActivityThread.main(ActivityThread.java:6806) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873) 
E/MQSEventManagerDelegate: failed to get MQSService.
I/Process: Sending signal. PID: 15077 SIG: 9
Application terminated.

Also, on running the example project using react-native run-android, I am getting this: ERROR: Could not find method implementation() for arguments [com.facebook.react:react-native:0.20.+] on project ':react-native-razorpay'.

I do not have any prior experience with native programming to make any calculated guesses, and couldn’t find a direction after a few hours of googling and trying. Please help!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
sumedhtcommented, Jan 30, 2019

@devautor Looks like this issue is because of some changes needs to be done in build.gradle file. Will check it at our end and update you soon.

1reaction
iThink32commented, Jan 30, 2019

@devautor By native I mean native - iOS and native-android modules and not react-native modules. Our package uses a native-iOS and Android framework as react-native supports it but not expo.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - java.lang.RuntimeException: Unable to start activity ...
So, I'm writing this. This is the error. java.lang.RuntimeException: Unable to start activity ComponentInfo{my.package.name/my ...
Read more >
Unable to start activity: IllegalArgumentException
This behavior is identical on the debugger and on a nexus s. :/ When attempting to launch the activity I see: I/ActivityManager( 105):...
Read more >
JIRA throws "Caused by: java.lang.IllegalArgumentException ...
When viewing an issue, JIRA will throw a 500 error. The following appears in the atlassian-jira.log. 2016-08-02 09:34:28,294 http- ...
Read more >
Bug: IllegalArgumentException in onResume ... - Issue Tracker
Crash was found via Crashlytics. Can send the link if needed. The relevant log: Fatal Exception: java.lang.RuntimeException: Unable to resume activity {..
Read more >
IllegalArgumentException (Java Platform SE 7 )
public class IllegalArgumentException extends RuntimeException. Thrown to indicate that a method has been passed an illegal or inappropriate argument.
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