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

Attempt to invoke virtual method 'java.lang.String android.webkit.WebView.getUrl()' on a null object reference #1324

Closed
4 tasks done
jhyoon99 opened this issue Sep 19, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@jhyoon99
Copy link

jhyoon99 commented Sep 19, 2022

Environment

Technology Version
Flutter version 3.0.0
Plugin version v5.4.3+7
Android version 8.1.0
iOS version
Xcode version

Device information:
Nexus 5X (LG-H791)

Description

A crash was reported in firebase.

Stacktrace/Logcat

`Caused by java.lang.NullPointerException
Attempt to invoke virtual method 'java.lang.String android.webkit.WebView.getUrl()' on a null object reference
com.pichillilorenzo.flutter_inappwebview.in_app_browser.InAppBrowserActivity.shareButtonClicked (InAppBrowserActivity.java:14)

java.lang.reflect.Method.invoke (Method.java)
androidx.appcompat.view.SupportMenuInflater$InflatedOnMenuItemClickListener.onMenuItemClick (SupportMenuInflater.java:39)
androidx.appcompat.view.menu.MenuItemImpl.invoke (MenuItemImpl.java:5)
androidx.appcompat.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:12)
androidx.appcompat.view.menu.MenuPopup.onItemClick (MenuPopup.java:27)
android.widget.AdapterView.performItemClick (AdapterView.java:318)
android.widget.AbsListView.performItemClick (AbsListView.java:1158)
android.widget.AbsListView$PerformClick.run (AbsListView.java:3127)
android.widget.AbsListView$3.run (AbsListView.java:4042)
android.os.Handler.handleCallback (Handler.java:790)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loop (Looper.java:164)
android.app.ActivityThread.main (ActivityThread.java:6494)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:807)`

@jhyoon99 jhyoon99 added the bug Something isn't working label Sep 19, 2022
@github-actions
Copy link

👋 @jhyoon99

NOTE: This comment is auto-generated.

Are you sure you have already searched for the same problem?

Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!

If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.

In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!

pichillilorenzo added a commit that referenced this issue Oct 19, 2022
…rowser option, Fixed iOS InAppBrowserOptions.hideProgressBar when getting options, Fixed missing implementation InAppBrowser.isHidden method on Android and iOS, Removed unnamed constructors for all Singleton classes to avoid incorrect usage
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