Error compiling in Dart - dart

I have a Dart with AngluarDart in local.
Ubuntu 16.04.2
DartSdk v1.23.0
"pub serve" seems work fine
$ pub serve
Loading source assets...
Loading angular2, dart_to_js_script_rewriter and dart_sass_transformer
transformers... (3.4s)
Serving xxx web on http://localhost:8080
Build completed successfully
But when I try to load the web into my browser I get this error:
[web] GET Served 3 cached assets.
[Info from Dart2JS]:
Compiling xxx|web/main.dart...
[Error from Dart2JS]:
web/main.dart:
The compiler crashed when compiling this element.
The compiler is broken.
When compiling the above element, the compiler crashed.
It is not possible to tell if this is caused by a problem in your program or not.
Regardless, the compiler should not crash.
The Dart team would greatly appreciate if you would take a moment to
report this problem at http://dartbug.com/new.
Please include the following information:
* the name and version of your operating system,
* the Dart SDK build number (build number could not be determined), and
* the entire message you see here (including the full stack trace
below as well as the source location above).
Build error:
Transform Dart2JS on xxx|web/main.dart threw error: The getter 'uses'
was called on null.
Receiver: null
Tried calling: uses
dart:core
Object.noSuchMethod
package:compiler_unsupported/src/dump_info.dart 576
DumpInfoTask.dumpInfoJson
package:compiler_unsupported/src/dump_info.dart 536
DumpInfoTask.dumpInfo.<fn>
package:compiler_unsupported/src/common/tasks.dart 63
CompilerTask.measure
package:compiler_unsupported/src/dump_info.dart 533
DumpInfoTask.dumpInfo
package:compiler_unsupported/src/compiler.dart 703
Compiler.compileLoadedLibraries.<fn>
package:compiler_unsupported/src/common/tasks.dart 176
CompilerTask.measureSubtask
package:compiler_unsupported/src/compiler.dart 582
Compiler.compileLoadedLibraries
package:compiler_unsupported/src/compiler.dart 471
Compiler.runInternal
===== asynchronous gap ===========================
package:compiler_unsupported/src/compiler.dart 310 Compiler.run.
<fn>.<fn>
dart:async
Future.Future.sync
package:compiler_unsupported/src/compiler.dart 310 Compiler.run.
<fn>
package:compiler_unsupported/src/common/tasks.dart 176
CompilerTask.measureSubtask
package:compiler_unsupported/src/compiler.dart 307 Compiler.run
package:compiler_unsupported/src/apiimpl.dart 245 CompilerImpl.run.<fn>.<fn>
Build completed with 2 errors.
[web] GET main.dart.js → Could not find asset xxx|web/main.dart.js.
[web] GET favicon.ico → (cached) xxx|web/favicon.ico
I tried to get DartSDK again, revised the PATH...
What can be the problem?

I solved the problem downgrading Dart SDK version.
From 1.23.0 to 1.21.1
Now the complilator do his job without problems.

Related

TACO CLI - failing to build on MAC (missing write access)

I am a broken man, my builds have been working for years, and since iOS did its latest build, i have issues. I cannot for life get this to work.
MAC is catilina, i cannot believe all of this was working and then a simple version update and i cannot get it to build. I use command line for android (it still works and build successfully). I used the gui for iOS but am now getting a vsTAC issue immediately, so changed to use TACO-cli and was able to connect to mac and start the build process. It fails with this error, my build is all there as id expect except the platform folder where id navigate to open the xcode as normal. But i assume this is because my build is failing. I have updated the mac to be on the exact versions windows is on, i have give all the files the correct permissions. I am totally at a loss. I have been on higher versions before and had it working in past, i wasnt able to update to cordova 9 as one of those plugins didnt support 9 yet.
Currently running:
npm 6.7.0
node 11.15.0
cordova 8.1.2
cordova-android 9.0.0
cordova-ios 6.1.0
23 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-android-permissions
24 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-app-version
25 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-bluetoothclassic-serial
26 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-device
27 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-dialogs
28 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-file
29 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-file-opener2
30 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-file-transfer
31 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-geolocation
32 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-inappbrowser
33 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-navigationbar
34 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-network-information
35 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-screen-orientation
36 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-statusbar
37 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-whitelist
38 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-wkwebview-engine
39 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-wkwebview-file-xhr
40 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-sqlite-storage
41 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/es6-promise-plugin
42 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/ionic-plugin-keyboard
43 warn checkPermissions Missing write access to /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/uk.co.workingedge.cordova.plugin.sqliteporter
44 timing stage:rollbackFailedOptional Completed in 1ms
45 timing stage:runTopLevelLifecycles Completed in 1869ms
46 warn VetIMPRESS#3.0.0 No repository field.
47 verbose stack Error: ENOENT: no such file or directory, access '/Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-android-permissions'
48 verbose cwd /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp
49 verbose Darwin 19.6.0
50 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "cordova-plugin-vs-taco-support" "--production" "--no-save"
51 verbose node v11.15.0
52 verbose npm v6.14.6
53 error code ENOENT
54 error syscall access
55 error path /Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-android-permissions
56 error errno -2
57 error enoent ENOENT: no such file or directory, access '/Users/AppleDev/.taco_home/remote-builds/taco-remote/builds/3456/cordovaApp/node_modules/cordova-plugin-android-permissions'
58 error enoent This is related to npm not being able to find a file.
59 verbose exit [ -2, true ]

DartAngular app not building after [SEVERE] Asynchronous error

Upgraded to dart sdk 2.5.0-stable. After running pub global run webdev serve web:8081 --auto=refresh --release im getting a severe error. I know breaking changes were introduced in this version but after reading changelog still has no idea how to fix it.
[INFO] Building new asset graph completed, took 2.3s
[INFO] Checking for unexpected pre-existing outputs. completed, took 1ms
[INFO] Serving `web` on http://127.0.0.1:8081
[SEVERE] ERROR - 2019-09-12 09:19:11.608930
[SEVERE] Asynchronous error
[SEVERE] type '_WebSocketProtocolTransformer' is not a subtype of type 'StreamTransformer<Uint8List, dynamic>' of 'streamTransformer'
[SEVERE] dart:async Stream.transform
[SEVERE] package:web_socket_channel/src/copy/web_socket_impl.dart 712:28 new WebSocketImpl.fromSocket
[SEVERE] package:web_socket_channel/src/channel.dart 94:36 new WebSocketChannel
[SEVERE] package:shelf_web_socket/src/web_socket_handler.dart 82:15 WebSocketHandler.handle.<fn>
[SEVERE]
SOLVED. The issue was with build_runner and web_socket_channel. Probably older version got stuck in. After making sure both has the latest version issue was resolved.
web_socket_channel 1.0.15
build_runner: ^1.6.9

"Generation failed" when generating docs with dartdoc

I am trying to generate the documentation for a Flutter project I'm working on.
I'm using dartdoc in the folder of my project.
It's the dartdoc of the Dart SDK installed with Chocolatey (so it's not the Flutter one), which I saved in my system PATH.
dart --version gives Dart VM version: 2.0.0-dev.53.0 (Thu May 3 12:35:47 2018 +0200) on "windows_x64".
I get exactly the same error using Flutter's Dart's dartdoc, so running path_to_flutter\flutter\bin\cache\dart-sdk\bin\dartdoc.bat' in my project's directory.
My flutter --version is:
Flutter 0.3.2 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 44b7e7d3f4 (3 weeks ago) • 2018-04-20 01:02:44 -0700
Engine • revision 09d05a3891
Tools • Dart 2.0.0-dev.48.0.flutter-fe606f890b
The output of dartdoc is, in both cases, after the parsing of all the project's files:
Generating documentation for 'pindery' into C:\Users\Edoardo Debenedetti\Documents\Tongji\Software Engineering\Progetto\pindery\doc\api\
parsing lib\catalogue\catalogue.dart...
parsing lib\catalogue\catalogue_element.dart...
[...]
Initialized dartdoc with 775 libraries in 61.7 seconds
documenting pindery
Generation failed: Bad state: Could not find "packageGraph.version" in given context
package:mustache4dart/mustache_context.dart 88 _MustacheContext._getInThisOrParent
package:mustache4dart/mustache_context.dart 78 _MustacheContext.field
package:mustache4dart/src/tokens.dart 169 _ExpressionToken.apply
package:mustache4dart/src/tokens.dart 247 _EscapeHtmlToken.apply
package:mustache4dart/src/tokens.dart 40 Token.call
package:mustache4dart/src/tmpl.dart 101 _Template._write
package:mustache4dart/src/tmpl.dart 76 _Template.call
package:mustache4dart/src/mustache.dart 11 render
package:mustache4dart/src/tokens.dart 211 _PartialToken.apply
package:mustache4dart/src/tokens.dart 40 Token.call
package:mustache4dart/src/tmpl.dart 101 _Template._write
package:mustache4dart/src/tmpl.dart 76 _Template.call
package:dartdoc/src/html/html_generator_instance.dart 287 HtmlGeneratorInstance._build
package:dartdoc/src/html/html_generator_instance.dart 171 HtmlGeneratorInstance.generatePackage
package:dartdoc/src/html/html_generator_instance.dart 90 HtmlGeneratorInstance._generateDocs
package:dartdoc/src/html/html_generator_instance.dart 36 HtmlGeneratorInstance.generate
===== asynchronous gap ===========================
dart:async _Completer.completeError
package:dartdoc/src/html/html_generator_instance.dart HtmlGeneratorInstance.generate
===== asynchronous gap ===========================
dart:async new Future.microtask
package:dartdoc/src/html/html_generator_instance.dart 34 HtmlGeneratorInstance.generate
package:dartdoc/src/html/html_generator.dart 107 HtmlGenerator.generate
===== asynchronous gap ===========================
dart:async new Future.microtask
package:dartdoc/src/html/html_generator.dart 73 HtmlGenerator.generate
package:dartdoc/dartdoc.dart 144 Dartdoc.generateDocs
===== asynchronous gap ===========================
dart:async _asyncThenWrapperHelper
package:dartdoc/dartdoc.dart 129 Dartdoc.generateDocs
E:\b\build\slave\dart-sdk-windows-dev\build\sdk\third_party\pkg\dartdoc\bin\dartdoc.dart 77 main.<fn>.<fn>
===== asynchronous gap ===========================
dart:async new Future.microtask
E:\b\build\slave\dart-sdk-windows-dev\build\sdk\third_party\pkg\dartdoc\bin\dartdoc.dart 76 main.<fn>.<fn>
dart:async runZoned
E:\b\build\slave\dart-sdk-windows-dev\build\sdk\third_party\pkg\dartdoc\bin\dartdoc.dart 76 main.<fn>
===== asynchronous gap ===========================
dart:async new Future.microtask
E:\b\build\slave\dart-sdk-windows-dev\build\sdk\third_party\pkg\dartdoc\bin\dartdoc.dart 75 main.<fn>
package:stack_trace Chain.capture
E:\b\build\slave\dart-sdk-windows-dev\build\sdk\third_party\pkg\dartdoc\bin\dartdoc.dart 75 main
Is it a problem of my project? How can I solve it?
Thank you very much.
Actually it is a bug, whose workaround is putting a version in the project's pubspec.yaml file.
E.g.
name: pindery
description: An amazing party app
version: 0.0.1-alpha0
[...]
In this way the documentation is succesfully generated.
You can see the issue on dartdoc's GitHub issues tracking page.

ejabberd incompatiblity with p1_yaml library

I have installed erlang/OTP 17.1 from source & I have installed ejabberd from GitHub. Both have installed successfully. But when i am starting ejabberd server, i am getting the following error in error.log.
2016-01-08 16:13:57.700 [error] <0.100.0> unable to load p1_yaml NIF: {error,{bad_lib,"Library version (2.8) not compatible (with 2.6)."}}
2016-01-08 16:13:57.700 [error] <0.99.0> CRASH REPORT Process <0.99.0> with 0 neighbours exited with reason: {{bad_lib,"Library version (2.8) not compatible (with 2.6)."},{p1_yaml_app,start,[normal,[]]}} in application_master:init/4 line 133
2016-01-08 16:13:57.769 [critical] <0.38.0>#ejabberd:exit_or_halt:133 failed to start application 'p1_yaml': {error,
{{bad_lib,
"Library version (2.8) not compatible (with 2.6)."},
{p1_yaml_app,start,[normal,[]]}}}
You likely have a p1_yaml.so file around that was build with a different version of Erlang runtime than the one you are using.
You should rebuild ejabberd (or just p1_yaml) with the correct Erlang version.

Valgrind stopped with Unable to handle kernel NULL pointer dereference at virtual address 0000000

I have an OpenCV 2.4.6 application (compiled with TBB), running in ARM cortex A9 board (Odroid X2). I get segmentation fault when running the application, so first I debug with gdb. gdb cannot finish the backtrace, giving message:
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
But it did output some trace, leading to TBB:
#3 0x001752f4 in tbb::interface6::internal::start_for<tbb::blocked_range<int>, (anonymous namespace)::ProxyLoopBody, tbb::auto_partitioner con)
()
#4 0x00502d9e in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all(tbb::task&, tbb::task*) ()
#5 0x00503610 in tbb::internal::arena::process(tbb::internal::generic_scheduler&) ()
#6 0x00506aa0 in tbb::internal::market::process(rml::job&) ()
#7 0x0050773e in tbb::internal::rml::private_worker::run() ()
#8 0x00507a7a in tbb::internal::rml::private_worker::thread_routine(void*) ()
#9 0xb6fafcb0 in start_thread () from /usr/lib/libpthread.so.0
I tried running without TBB, and it runs fine. But I need TBB because it helps my application runs 2-3x faster, so I debug with Valgrind based on my previous experience with segmentation fault and multithreading problem. Unfortunately too, Valgrind stops and messages appear, seems related to kernel (?):
[27140.140000] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[27140.140000] pgd = ebf10000
[27140.140000] [00000000] *pgd=6a02e831, *pte=00000000, *ppte=00000000
[27140.140000] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[27140.140000] Modules linked in: r8712u(C) ath9k_htc ath9k_common ath9k_hw ath mac80211 cfg80211 rfkill vfat fat smsc95xx uvcvideo usbnet vide6
...
[27140.140000] Code: e3110001 0a00004d e59f1150 e5911000 (e7912102)
[27140.140000] ---[ end trace ce3bd4d9f0a91ec4 ]---
[27140.140000] note: memcheck-arm-li[5626] exited with preempt_count 1
I am pretty new to Linux and debugging tool, thus I will be most grateful if you can help me understand what happened. Is it my application runs bad? Is it Valgrind that cause the crash? Do I need to reinstall Linux?
Oh yeah, I cannot type anything to the console after the message, but if I turn the device off, then on again, I can start using Linux again. Thanks!

Resources