DartAngular app not building after [SEVERE] Asynchronous error - dart

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

Related

Spring Native with buildpacks error com.oracle.graal.pointsto.constraints.UnresolvedElementException

I am trying to build a Spring Native application using buildpacks by following the instructions from: https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/#getting-started
I changed Java version to 11 or 17 to avoid an error. Locally I have installed GraalVM v17 (22.2.0 and 22.3.0-dev).
When running mvn spring-boot:build-image I receive the following error related to BeanUtils:
[INFO] [creator] Fatal error: com.oracle.graal.pointsto.util.AnalysisError$ParsingError:
Error encountered while parsing
org.springframework.boot.SpringApplication.createSpringFactoriesInstances(java.lang.Class, java.lang.Class[], java.lang.ClassLoader, java.lang.Object[], java.util.Set)
[INFO] [creator] Parsing context:
[INFO] [creator] at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:439)
[INFO] [creator] at org.springframework.nativex.substitutions.boot.Target_SpringApplication.getSpringFactoriesInstances(Target_SpringApplication.java:173)
[INFO] [creator] at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:424) [INFO] [creator]
[INFO] [creator] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisError.parsingError(AnalysisError.java:152)
[INFO] [creator] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.createFlowsGraph(MethodTypeFlow.java:104)
[...]
[INFO] [creator] Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError:
com.oracle.graal.pointsto.constraints.UnresolvedElementException:
Discovered unresolved method during parsing:
org.springframework.beans.BeanUtils$KotlinDelegate.instantiateClass(java.lang.reflect.Constructor, java.lang.Object[]).
This error is reported at image build time because class
org.springframework.beans.BeanUtils is registered for linking at image build time by system default
[INFO] [creator] at parsing org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:196) [...]
[INFO] [creator] ... 13 more
[INFO] [creator] Caused by: com.oracle.graal.pointsto.constraints.UnresolvedElementException:
Discovered unresolved method during parsing:
org.springframework.beans.BeanUtils$KotlinDelegate.instantiateClass(java.lang.reflect.Constructor, java.lang.Object[]).
This error is reported at image build time because class
org.springframework.beans.BeanUtils is registered for
linking at image build time by system default
... 38 more
[INFO] [creator] --------------------------------------------------------------------------------
The build is working fine when using Native Build Tools. The .exe files executes correctly ( I am using Windows).
Seems like there is an issue with paketobuildpacks/builder:0.1.242-tiny which I also experienced in paketobuildpacks/builder:base.
Downgrading to 0.1.241-tiny seems to resolve the issue.
See paketo-buildpacks/native-image#176 for workarounds to this problem, and follow that issue for the resolution.
This error has suddenly started appearing recently on all projects (without making any changes) which were building fine with
spring-boot:build-image.

Dart beginning - unable to run AngularDart Web App template

Im trying to following the instructions on https://webdev.dartlang.org/guides/get-started
I have installed 2.0.0-dev.55.0 in /usr/lib/dart.
And have Dartium installed in /home/bob/Documents/software/dartium-linux-x64-stable-1.24.2.0/chrome.
When I try 5. Run the app. I get the following:
pubspec.yaml
name: angular_app
description: A web app that uses AngularDart
version: 0.0.1
environment:
sdk: '>=2.0.0-dev.51.0 <2.0.0'
dependencies:
angular: ^5.0.0-alpha+12
dev_dependencies:
angular_test: ^2.0.0-alpha
build_runner: ^0.8.8
build_test: ^0.10.2
build_web_compilers: ^0.4.0
test: ^0.12.30
I have tried right-click pubspec.yaml and choose Pub: Get Dependencies but this didnt make any difference.
I have also tried using the sample dart project from https://github.com/angular-examples/quickstart which uses Dart 2, and NOT using Dartium. But I still get the same error.
When I run pub run build_runner serve I get
Could not find bin/build_runner.dart in package build_runner.
Building in WebStorm
When I build using Webstorm, everything looks rosie:
Working dir: /home/anton/WebstormProjects/quickstart
/usr/lib/dart/bin/pub global run webdev build --output=web:build
[INFO] Initializing inputs
[INFO] Reading cached asset graph...
[INFO] Reading cached asset graph completed, took 675ms
[INFO] Checking for updates since last build...
[INFO] Checking for updates since last build completed, took 808ms
[INFO] Running build...
[INFO] build_web_compilers|entrypoint on web/main.dart:Running dart2js with --minify --packages=.package-643dc5d58d0e8c6a495fcb24c0476818 -oweb/main.dart.js web/main.dart
[INFO] 1.5s elapsed, 3/4 actions completed.
[INFO] 2.6s elapsed, 3/4 actions completed.
[INFO] 3.7s elapsed, 3/4 actions completed.
[INFO] 4.8s elapsed, 3/4 actions completed.
[INFO] 5.9s elapsed, 3/4 actions completed.
[INFO] 7.0s elapsed, 3/4 actions completed.
[INFO] 8.1s elapsed, 3/4 actions completed.
[INFO] build_web_compilers|entrypoint on web/main.dart:Dart2Js finished with:
Compiled 9,664,399 characters Dart to 162,915 characters JavaScript in 7.72 seconds
Dart file (web/main.dart) compiled to JavaScript: web/main.dart.js
[INFO] Running build completed, took 9.2s
[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 271ms
[INFO] Creating merged output dir `build`...
[INFO] Creating merged output dir `build` completed, took 2.9s
[INFO] Writing asset manifest...
[INFO] Writing asset manifest completed, took 3ms
[INFO] Succeeded after 12.3s with 3 outputs (1859 actions)
Process finished with exit code 0
I have also tried using https://github.com/dart-lang/angular/tree/master/examples but still get the same error.

Error compiling in 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.

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.

Titanium: App not being deployed to iOS simulator after iOS 9 upgrade

XCode decided to do an upgrade to iOS 9, and after that the app refuses to deploy to the emulator.
The build works ok, but it fails at this:
[INFO] : Invoking xcodebuild
[INFO] : Finished building the application in 40s 523ms
[INFO] : Launching iOS Simulator
[ERROR] : Project failed to build after 1m 21s 108ms
[ERROR] : An error occurred running the iOS Simulator (ios-sim exit code 1)
TRACE | titanium exited with exit code 1
ERROR | Error: ti run exited with error code 1
at ChildProcess.<anonymous> (/Users/stop/.appcelerator/install/5.0.1/package/node_modules/appc-cli-titanium/plugins/run.js:89:66)
at ChildProcess.emit (events.js:117:20)
at Process.ChildProcess._handle.onexit (child_process.js:810:12)
Any ideas?
There's no updates that i can install, it says everything is up to date.
I have SDK 5.1.0. installed
Ok, so i did 2 things here, not sure which one fixed it.
I ran appc setup and let it finish
I removed all the errors around the icons and images that were missing and were the wrong size.
After that it just started working. Not sure which of the 2 fixed it.

Resources