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] Fatal error: null value for a non-nullable variable #303

Open
jagomf opened this issue Jun 3, 2024 · 5 comments
Open

[iOS] Fatal error: null value for a non-nullable variable #303

jagomf opened this issue Jun 3, 2024 · 5 comments

Comments

@jagomf
Copy link

jagomf commented Jun 3, 2024

I am using version 1.8.0 of this plugin and Flutter 3.22.1 (can't confirm if this was happening in prior versions since this feature was not being thoroughly tested)

Sharing a picture to my app in iOS works only for the 1st time. All subsequent times, app just breaks upon receiving shared image and all I get in the console is:

receive_sharing_intent/SwiftReceiveSharingIntentPlugin.swift:192: Fatal error: Unexpectedly found nil while unwrapping an Optional value

@jagomf jagomf changed the title [iOS] Fatal error: Unexpectedly found nil while unwrapping an Optional value [iOS] Fatal error: null value for a non-nullable variable Jun 3, 2024
@xingxingc
Copy link

How fix this?

@xingxingc
Copy link

WeChat608b8181d3819560f50261ffd33066db

@tomislavmiksik
Copy link

Have you found the solution yet ? I am having the same issue, except it doesn't work at all not even the first time...

@xingxingc
Copy link

Have you found the solution yet ? I am having the same issue, except it doesn't work at all not even the first time...

I haven't solved it yet. Currently, I manually made another conversion when encodData is empty, which can avoid application crashes. However, sometimes it may not run properly when receiving files.
image

@tomislavmiksik
Copy link

Tested on my example, works fine, are there any other things I should be careful of or check ? Thanks for help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants