Closed crtl closed 3 years ago
To help us repro, what hints did you see? If you fix the hints, does hot reload work properly? It could also be useful to click the refresh button in the analysis server window to make sure the output there isn't stale for some reason.
The only hint shown is the one above the Analysis
tab. "Analysis issues. Hot reload failed". There is no issue anywhere in the code editing window and also no issue shown in the linter results.
Does this still happen after doing flutter upgrade
?
Without additional information we're unfortunately not sure how to resolve this issue. We're going to close this bug for now, but please don't hesitate to comment on the bug if you have any more information for us; we're happy to reopen. Thanks for your contribution!
@stevemessick I have upgrade flutter multiple times in the lifetime of this bug and switched branches.
Sry I have not many details because there is no reliable method to reproduce it. Thats an issue for itself. Where can I find logs of dart analysis or any information? Are there even any?
Where can I find logs of dart analysis or any information? Are there even any?
As @alexander-doroshko wrote: To get logs: open Registry (searchable using Find Action(Cmd+Shift+A)), and add the following to the dart.server.additional.arguments property:
--instrumentation-log-file=/some/path/das.log After that, restart the Analysis Server (a button with red errors in the Dart Analysis tool window), reproduce the issue, and attach das.log file here.
Without additional information we're unfortunately not sure how to resolve this issue. We're going to close this bug for now, but please don't hesitate to comment on the bug if you have any more information for us; we're happy to reopen. Thanks for your contribution!
@stevemessick
Analysis Server DiagnosticsDiagnostics Feedback Docs Spec 500 Oops NoSuchMethodError: The getter 'path' was called on null. Receiver: null Tried calling: path
In my case,
ABC? test_Dart_Analysis_Fail_That_Cause_Hot_Reload_Fail_Case_001 (List<ABC?>? items) {
return item?[0];
}
Above code example will fail to hot reload, because the dart analyer
has bug !!!
I also have this bug. For example I have this ListView
return ListView.builder(
itemCount: ratings!.length,
shrinkWrap: true,
primary: false,
itemBuilder: (context, index) {
return RatingRow(
text: state.getLabelForDriverRating(ratings?[index]),
rating: ratings?[index].rating,
);
},
);
Because of ratings?[index]
hot reload does not work, even though it is not showing any errors in the Dart Analysis tab.
Force unwrapping fixes the hot reload ratings![index]
.
This will be fixed in the next Dart plugin update.
I also see this bug. It happens on my >10k lines of flutter code, so I cannot make a reproducible sample.
@alexander-doroshko Thanks sounds wonderful! I wonder when will the next update be released? Before the update, what workaround can I do?
EDIT: I have even uninstall and reinstalled the plugin, but still cannot use hot reload :(
The problem related to the foo?[bar]
syntax has been fixed and the fix is included in the latest Dart plugin versions.
There might be other problems with hot reload, they should be investigated separately. Please attach the file that fails to be hot-reloaded and provide the versions of the Dart and Flutter plugins.
@alexander-doroshko
thanks. work well in android 4.2 and newest flutter plugin.
I have the same bug with dart version 2.13.4 ....
I also have this issue, specifically in some files in my project. However, pressing save on other files in the same project works...
I am having this issue too. What I found to be the cause is a parameter, which is annotated, required and has type. So for example the following code will cause this bug to happen for me:
void foo({@Deprecated('foo') required int foo}) {
print('hi');
}
@Quijx Thanks, filed as https://youtrack.jetbrains.com/issue/WEB-55630, will fix shortly.
Since today the my analyser in AndroidStudio started showing: "Hot reload failed. Analysis issues".
Clicking "View Issues" shows no issues, only hints. If I build the app it builds and it also works on hot restart but not hot reload.
Steps to Reproduce
Dont know
Version info