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

iOS flutter_inappwebview/URLRequest.swift:13: Fatal error: Unexpectedly found nil while unwrapping an Optional value #1173

Closed
4 tasks done
kotran88 opened this issue May 3, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@kotran88
Copy link

kotran88 commented May 3, 2022

Environment

Technology Version
Flutter version 2.10.5
Plugin version 5.4.1+2
Android version
iOS version 11
Xcode version latest

Device information:

Description

Expected behavior:

Current behavior:

Steps to reproduce

when app started, it cause error on Xcode or viscose' debug console

flutter_inappwebview/URLRequest.swift:13: Fatal error: Unexpectedly found nil while unwrapping an Optional value
2022-05-03 19:02:17.629025+0900 Runner[3860:371793] flutter_inappwebview/URLRequest.swift:13: Fatal error: Unexpectedly found nil while unwrapping an Optional value
(lldb)

iOS > .symlinks> plugins > flutter_inappwebview > iOS > classes > Types > URLRequest.swift. 13 line is the problem .

self.init(url: URL(string: url)!)

How can I solve this?

Images

Stacktrace/Logcat

@kotran88 kotran88 added the bug Something isn't working label May 3, 2022
@github-actions
Copy link

github-actions bot commented May 3, 2022

👋 @kotran88

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!

@kotran88
Copy link
Author

kotran88 commented May 3, 2022

removing ./pub-cache folder or flutter clean, pod clean not working at all
#932

@pichillilorenzo pichillilorenzo changed the title Unexpectedly found nil while unwrapping an Optional value iOS flutter_inappwebview/URLRequest.swift:13: Fatal error: Unexpectedly found nil while unwrapping an Optional value May 5, 2022
@pichillilorenzo
Copy link
Owner

Fixed with new release 5.4.3+6. Now if you try to make an URL Request using null as URL, it will load about:blank.

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