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

NosuchMethodError: The getter '_value' was called on null #41894

Closed
boomitsocial opened this issue Oct 3, 2019 · 4 comments
Closed

NosuchMethodError: The getter '_value' was called on null #41894

boomitsocial opened this issue Oct 3, 2019 · 4 comments
Labels
c: crash Stack traces logged to the console d: stackoverflow Good question for Stack Overflow

Comments

@boomitsocial
Copy link

boomitsocial commented Oct 3, 2019

Hello,
So our app was deployed on PlayStore & AppStore in June. We haven't updated it since. Everything was working well, but suddenly we started getting this error on or chat-room/list page. We know we haven't upgraded our flutter (it's taking more time due to many many breaking changes and our team can only work on this on weekends).
So now out of the blue, two very important screens of our live app is down. Any help in solving or tracking down this issue will be appreciated.
WhatsApp Image 2019-10-03 at 11 18 39 AM

> [√] Flutter (Channel dev, v0.11.9, on Microsoft Windows [Version 10.0.18362.356], locale en-IN)
    • Flutter version 0.11.9 at C:\src\flutter
    • Framework revision d48e6e433c (11 months ago), 2018-11-20 22:05:23 -0500
    • Engine revision 5c8147450d
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

>[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at C:\Users\bhavi\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    X Android license status unknown.

>[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 38.2.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

>[√] VS Code (version 1.38.1)
    • VS Code at C:\Users\bhavi\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.4.1

[√] Connected device (1 available)
    • SM N9208 • 11160b2925d22e02 • android-arm64 • Android 7.0 (API 24)
Attaching the stack trace from flutter run
[stack.txt](https://github.com/flutter/flutter/files/3684870/stack.txt)

The rest of the app works fine (all screens open, connects to our api and calls data, etc.) in fact we can even click on 'New Message' and are able to successfully send a message to a contact.
The only thing not working, as mentioned earlier, is the UI of chat list/chat room list page (Chats & Plans)

@janmoppel janmoppel added d: stackoverflow Good question for Stack Overflow c: crash Stack traces logged to the console platform-windows Building on or for Windows specifically and removed platform-windows Building on or for Windows specifically labels Oct 3, 2019
@janmoppel
Copy link

Hello @boomitsocial !

Thank you for posting an issue.

It seems like that similar behaviour was reported and discussed here before: https://stackoverflow.com/questions/54415836/nosuchmethoderror-the-getter-value-was-called-on-null-populating-list-of-d

Can you please provide more information for reproducing the issue. E.g. small self-contained application with the similar logic as in the chat room list page. As from the first look at your issue and attached StackOverflow discussion, it doesn't seem like there is a problem in the Flutter itself.

Thank you.

@janmoppel janmoppel added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Oct 3, 2019
@escamoteur
Copy link
Contributor

May I add, please enable 'Break on all Exeptions' in your debugger? Then you get a full stacktrace when this happens.
This stacktrace would be important for us.
But you are on a really really old Flutter version so I recommend doing the upgrade.

@boomitsocial
Copy link
Author

Hello, so after literally going through almost every line of code, we found the issue.
Instead of
if ( messageDateTime.month < 10 ){ if ( messageDateTime.day < 10 ){ messageDateTime = DateTime.parse("${messageDateTime.year}-0${messageDateTime.month}-0${messageDateTime.day} 00:00:00"); } else { messageDateTime = DateTime.parse("${messageDateTime.year}-0${messageDateTime.month}-${messageDateTime.day} 00:00:00"); }
we did
if ( messageDateTime.month < 10 ){ if ( messageDateTime.day < 10 ){ messageDate = DateTime.parse("${messageDateTime.year}-0${messageDateTime.month}-0${messageDateTime.day} 00:00:00"); } else { messageDate = DateTime.parse("${messageDateTime.year}-0${messageDateTime.month}-${messageDateTime.day} 00:00:00"); }
Really small mistake, but just wanted to say that, sometimes it's not flutter, plugins or apis, its just a small mistake :)

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Oct 5, 2019
@github-actions
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, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: crash Stack traces logged to the console d: stackoverflow Good question for Stack Overflow
Projects
None yet
Development

No branches or pull requests

3 participants