flutter_secure_storage icon indicating copy to clipboard operation
flutter_secure_storage copied to clipboard

Error writing to secure storage: Null check operator used on a null value"

Open denislunjski opened this issue 8 months ago • 3 comments

Hello,

can you help me with this error. Writing some data in secure storage doesn't work on some web browsers.

I had an issue on android mobile phone in android webview default app and second one was on macOS Mozilla.

On other browsers it works.

"Error writing to secure storage: Null check operator used on a null value"

Also in console I'm seeing this.

"HelpMeWrite::parse(), start", source: (460) 2025-03-12 13:13:33.742 16427-16427 chromium com.sec.android.app.sbrowser I INFO:CONSOLE(354)] "HelpMeWrite::isActiveElementTextArea(), input", source: (354) 2025-03-12 13:13:33.743 16427-16427 chromium com.sec.android.app.sbrowser I INFO:CONSOLE(453)] "HelpMeWrite::findContentNode(), No rules", source: (453) 2025-03-12 13:13:33.743 16427-16427 chromium com.sec.android.app.sbrowser I INFO:CONSOLE(506)] "HelpMeWrite::parse(), success = false, reason = 3", source: (506) 2025-03-12 13:13:43.705 16427-16427 chromium com.sec.android.app.sbrowser I INFO:CONSOLE(460)] "HelpMeWrite::parse(), start", source: (460) 2025-03-12 13:13:43.705 16427-16427 chromium com.sec.android.app.sbrowser I INFO:CONSOLE(354)] "HelpMeWrite::isActiveElementTextArea(), input", source: (354) 2025-03-12 13:13:43.705 16427-16427 chromium com.sec.android.app.sbrowser I INFO:CONSOLE(453)] "HelpMeWrite::findContentNode(), No rules", source: (453) 2025-03-12 13:13:43.705 16427-16427 chromium com.sec.android.app.sbrowser I INFO:CONSOLE(506)] "HelpMeWrite::parse(), success = false, reason = 3", source: (506)

I'm using flutter_secure_storage: ^9.2.4

Can you please help me with this?

denislunjski avatar Mar 12 '25 12:03 denislunjski

⚠️ This issue has been marked as stale because it has been open for 60 days with no activity.

If this issue is still relevant, please comment to keep it active. Otherwise, it will be closed in 60 days.

github-actions[bot] avatar May 12 '25 03:05 github-actions[bot]

Got the same issue. It works OK on Chrome and Firefox in Windows PC, but I got the error while using Chrome in an Android phone. In the same phone, when using Firefox, this issue does not happen but it also doesn't save anything.

Ri-car-do-1989 avatar May 23 '25 17:05 Ri-car-do-1989

Upon further research, I found @this. That was my problem, and running my app with HTTPS did solve the issue. I noticed that this information is present in the github page, but it is not present in the pub.dev package page. I'd suggest adding that info in the pub.dev page, as I think many people will look there for information (as I did).

Ri-car-do-1989 avatar May 23 '25 17:05 Ri-car-do-1989

⚠️ This issue has been marked as stale because it has been open for 60 days with no activity.

If this issue is still relevant, please comment to keep it active. Otherwise, it will be closed in 60 days.

github-actions[bot] avatar Jul 23 '25 03:07 github-actions[bot]