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

In App Browser Crashing in Android - Action Bar is null #1137

Closed
4 tasks done
Srj-Love opened this issue Mar 25, 2022 · 2 comments
Closed
4 tasks done

In App Browser Crashing in Android - Action Bar is null #1137

Srj-Love opened this issue Mar 25, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@Srj-Love
Copy link

Srj-Love commented Mar 25, 2022

Environment

Technology Version
Flutter version 2.8.0
Plugin version ^5.3.2
Android version 11
iOS version -
Xcode version -

Device information: Samsung F22

Description

It should open browser in App:

It's crashing the whole app while calling method:

Just Tryied to run Example Code

Stacktrace/Logcat <!--E/AndroidRuntime(19756): FATAL EXCEPTION: main

E/AndroidRuntime(19756): Process: org.hccts.brain, PID: 19756
E/AndroidRuntime(19756): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.hccts.brain/com.pichillilorenzo.flutter_inappwebview.in_app_browser.InAppBrowserActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.appcompat.app.ActionBar.setDisplayShowTitleEnabled(boolean)' on a null object reference
E/AndroidRuntime(19756): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3846)
E/AndroidRuntime(19756): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4022)
E/AndroidRuntime(19756): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
E/AndroidRuntime(19756): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime(19756): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime(19756): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2336)
E/AndroidRuntime(19756): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(19756): at android.os.Looper.loop(Looper.java:246)
E/AndroidRuntime(19756): at android.app.ActivityThread.main(ActivityThread.java:8653)
E/AndroidRuntime(19756): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(19756): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
E/AndroidRuntime(19756): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
E/AndroidRuntime(19756): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.appcompat.app.ActionBar.setDisplayShowTitleEnabled(boolean)' on a null object reference
E/AndroidRuntime(19756): at com.pichillilorenzo.flutter_inappwebview.in_app_browser.InAppBrowserActivity.prepareView(InAppBrowserActivity.java:181)
E/AndroidRuntime(19756): at com.pichillilorenzo.flutter_inappwebview.in_app_browser.InAppBrowserActivity.onCreate(InAppBrowserActivity.java:123)
E/AndroidRuntime(19756): at android.app.Activity.performCreate(Activity.java:8207)
E/AndroidRuntime(19756): at android.app.Activity.performCreate(Activity.java:8191)
E/AndroidRuntime(19756): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
E/AndroidRuntime(19756): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3819)
E/AndroidRuntime(19756): ... 11 more-->

@Srj-Love Srj-Love added the bug Something isn't working label Mar 25, 2022
@github-actions
Copy link

👋 @Srj-Love

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!

@Srj-Love Srj-Love changed the title Crash In Calling Browser Android 11 In App Browser Crashing in Android 11 Mar 25, 2022
@pichillilorenzo pichillilorenzo changed the title In App Browser Crashing in Android 11 In App Browser Crashing in Android - Action Bar is null Apr 18, 2022
pichillilorenzo added a commit that referenced this issue Apr 18, 2022
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants