Closed izzatzr closed 5 years ago
Same here.
expansion_tile_sample.dart has auto save data; consider M-x recover-this-file
Dart analysis server crashed, restarting.
File mode specification error: (wrong-type-argument stringp nil)
Error during redisplay: (jit-lock-function 1) signaled (error "Variable binding depth exceeds max-specpdl-size")
Error during redisplay: (jit-lock-function 501) signaled (error "Variable binding depth exceeds max-specpdl-size")
Error during redisplay: (jit-lock-function 1001) signaled (error "Variable binding depth exceeds max-specpdl-size")
error in process filter: json-read: JSON readtable error: 47
error in process filter: JSON readtable error: 47
@Izzatzr and @twlz0ne, thank you for the reports. Please provide steps to reproduce the issue.
@bradyt I created a minimal configuration test-dart-mode-issue69.el, just download and run, you'll see the problem.
This configuration will download required packages into ~/.emacs.d/test-dart-mode-issue69/<emacs-version>/elpa
, isolated from your ~/.emacs.d/
.
@twlz0ne can you try (setq dart-debug t)
and share the contents of the *dart-debug*
buffer? When I reproduced the error, the following modification seemed to fix it.
(setq dart-sdk-path "/path/to/flutter/bin/cache/dart-sdk/")
@twlz0ne I will assume the previous comment fixes your issue. If it does not, can you share a docker instance which shows me how to reproduce the issue? I've added an example docker environment to the wiki.
@Izzatzr Your issue may have been different, but I will similarly close this issue for now, for lack of clarifying details.
Im getting the same issue, and setting (setq dart-sdk-path "/path/to/flutter/bin/cache/dart-sdk/") didn't seem to fix the problem for me. Seems like the dart analysis server reports an exception? @twlz0ne: Did you get it to work?
@kristianhasselknippe thank you for reporting the issue. Is it possible you can share how to reproduce the issue? A walkthrough of reproducing in Docker would be excellent, I have notes on doing so in the wiki.
@bradyt : I'll give it a go :)
I haven't worked with docker before, so not sure how long this will take me to figure out. Is it supposed to work on windows?
@kristianhasselknippe, yes, the Docker snippets in the wiki should work on Windows. I have not tested. If it does not work, please let us know, with any additional info that may help us locate why these Docker snippets do not work on Windows.
@bradyt: Sorry, the reason i got these errors seems to be because i was using verson 1.0.3 (which is what marmelade gave me), which is missing some fixes which are currently on master. I got it working now using the tip of master instead.
Is marmelade still the recommended repo to get this package from? Thanks for the quick responses.
@kristianhasselknippe Great! I am reopening the issue. I have so far edited the README to suggest melpa instead of marmalade, the latter seems to be abandoned. I have a few more things to do on this issue when I have more time. I want to try to reproduce the issue, and then, I will look into bumping the semantic version tag. The most recent tag sitting on a broken version of dart-mode could cause problems with melpa-stable. At this point I only wonder if that would fix the marmalade issue too.
More soon!
@bradyt
the following modification seemed to fix it.
(setq dart-sdk-path "/path/to/flutter/bin/cache/dart-sdk/")
It does, but I have a new problem now:
@twlz0ne The remainder of this comment was filed as a new issue, https://github.com/bradyt/dart-mode/issues/71, by @bradyt, to keep this thread more concise.
I'm getting the same error.
Whenever i type anything on a dart file the debugger gives the following message:
Sent: {"id":"24","method":"analysis.setAnalysisRoots","params":{"included":["e:/Projects/Flutter/ui_test/"],"excluded":null}}
2018-12-08T16:55:43+0000
Sent: {"id":"23","method":"analysis.updateContent","params":{"files":{"e:/Projects/Flutter/ui_test/lib/main.dart":{"type":"add","content":"import 'package:flutter/material.dart';\n\nvoid main() => runApp(ChatApp());\n\nclass ChatApp extends StatelessWidget {\n @override\n Widget build(BuildContext context) {\n return new MaterialApp(\n title: \"ChatApp\",\n home: new ChatScreen(),\n );\n }\n}\n\nclass ChatScreen extends StatefulWidget {\n @override\n State createState() => new ChatScreenState();\n}\n\nclass ChatScreenState extends State<ChatScreen> {\n @override\n final TextEditingController _textController = new TextEditingController();\n\n Widget build(BuildContext context) {\n return new Scaffold(\n appBar: new AppBar(title: new Text(\"CHATAPP\")),\n body: _buildTextComposer(),\n );\n }\n\n Widget _buildTextComposer() {\n return new Container(\n margin: const EdgeInsets.symmetric(horizontal: 8.0),\n child: new Row(\n children: <Widget>[\n new Flexible(\n child: new TextField(\n controller: _textController,\n onSubmitted: _handleSubmitted,\n decoration:\n new InputDecoration.collapsed(hintText: \"Send a message\"),\n ),\n ),\n new Container(\n margin: new EdgeInsets.symmetric(horizontal: 4.0),\n child: new IconButton(\n icon: new Icon(Icons.send),\n onPressed: () => _handleSubmitted(_textController.text)),\n ),\n ],\n ),\n );\n }\n\n void _handleSubmitted(String text) {\n _textController.clear();\n }\n}\n"}}}}
2018-12-08T16:55:43+0000
Sent: {"id":"25","method":"analysis.updateContent","params":{"files":{"e:/Projects/Flutter/ui_test/lib/main.dart":{"type":"change","edits":[{"offset":671,"length":0,"replacement":"a"}]}}}}
2018-12-08T16:55:43+0000
Sent: {"id":"26","method":"analysis.updateContent","params":{"files":{"e:/Projects/Flutter/ui_test/lib/main.dart":{"type":"change","edits":[{"offset":672,"length":0,"replacement":"s"}]}}}}
2018-12-08T16:55:43+0000
Sent: {"id":"27","method":"analysis.updateContent","params":{"files":{"e:/Projects/Flutter/ui_test/lib/main.dart":{"type":"change","edits":[{"offset":673,"length":0,"replacement":"d"}]}}}}
2018-12-08T16:55:43+0000
Received: Unhandled exception:
The dart-analysis-server gives the following error:
Process dart-analysis-server exited abnormally with code 255
And i get the following error on Messages:
error in process filter: JSON readtable error: 85
This is my .init
(require 'flycheck)
(require 'cl)
(require 'dart-mode)
(setq dart-debug t)
(setq dart-enable-analysis-server t)
(add-to-list 'auto-mode-alist '("\\.dart\\'" . dart-mode))
(add-hook 'dart-mode-hook 'dart-file-handle)
(add-hook 'dart-mode-hook 'flycheck-mode)
(setq dart-sdk-path "C:/Program Files/Dart/dart-sdk/")
Emacs debugger gives the following message:
Debugger entered--Lisp error: (json-readtable-error 85)
signal(json-readtable-error (85))
json-read()
json-read-from-string("Unhandled exception:")
dart--analysis-server-process-filter(#s(dart--analysis-server :process #<process dart-analysis-server> :buffer #<buffer dart-analysis-server>) "Unhandled exception:\nFormatException: Could not find an option named \"error-notification\".\n#0 Parser.validate (package:args/src/parser.dart:261:21)\n#1 Parser.parseLongOption (package:args/src/parser.dart:239:9)\n#2 Parser.parse (package:args/src/parser.dart:90:11)\n#3 ArgParser.parse (package:args/src/arg_parser.dart:307:45)\n#4 CommandLineParser.parse (package:analysis_server/src/server/driver.dart:96:15)\n#5 Driver.start (package:analysis_server/src/server/driver.dart:319:33)\n#6 main (file:///E:/b/build/slave/dart-sdk-windows-stable/build/sdk/pkg/analysis_server/bin/server.dart:12:11)\n<asynchronous suspension>\n#7 _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)\n#8 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)\n")
#f(compiled-function (_ string) #<bytecode 0x1001c15e5>)(#<process dart-analysis-server> "Unhandled exception:\nFormatException: Could not find an option named \"error-notification\".\n#0 Parser.validate (package:args/src/parser.dart:261:21)\n#1 Parser.parseLongOption (package:args/src/parser.dart:239:9)\n#2 Parser.parse (package:args/src/parser.dart:90:11)\n#3 ArgParser.parse (package:args/src/arg_parser.dart:307:45)\n#4 CommandLineParser.parse (package:analysis_server/src/server/driver.dart:96:15)\n#5 Driver.start (package:analysis_server/src/server/driver.dart:319:33)\n#6 main (file:///E:/b/build/slave/dart-sdk-windows-stable/build/sdk/pkg/analysis_server/bin/server.dart:12:11)\n<asynchronous suspension>\n#7 _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)\n#8 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)\n")
I've downloaded the dart-mode package from MELPA, and right now i'm kinda lost on what to try anymore.
I get the same error even when i toogle the dart-enable-analysis-server variable off, which makes no sense at all....
@JosePtm2 Hello, thank you for the report! I have tried to reproduce your issue in a docker image, at https://github.com/bradyt/docker-emacs-dart/tree/issue-69, but I was not able. At this time I will take a guess that you have installed from melpa-stable rather than melpa. If that is the problem, I have recently pushed a tag 1.0.4
, and that should skip melpa-stable version past this json readtable error.
If I am wrong, I would like clarification, perhaps ideally by sharing a minimal error reproduce in docker.
I will close this for now.
Yes, that's the issue.
Thank you
any idea to fix this error ?