web_audio_dart2js.dart:53:20: Native functions can only be declared in the SDK and code that is loaded through native extensions. #1505

Closed
opened 2026-02-20 23:28:41 -05:00 by deekerman · 1 comment
Owner

Originally created by @paulmenzel on GitHub (Mar 10, 2023).

Bug Description

Using Flutter 3.7.7, trying to build Rustdesk from source, it fails with the error below:

$ git log --oneline --no-decorate -1
6734dd01 Merge branch 'master' of github.com-rustdesk:rustdesk/rustdesk
$ wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.7.7-stable.tar.xz
$ tar xf flutter_linux_3.7.7-stable.tar.xz
$ export PATH=/…/rustdesk/flutter/bin:$PATH
$ cd flutter
$ flutter pub get
Running "flutter pub get" in flutter_tools...
Resolving dependencies in packages/flutter_tools... (2.0s)
  _fe_analyzer_shared 50.0.0 (55.0.0 available)
  analyzer 5.2.0 (5.7.1 available)
  archive 3.3.2 (3.3.6 available)
  args 2.3.1 (2.4.0 available)
  built_value 8.4.2 (8.4.4 available)
  checked_yaml 2.0.1 (2.0.2 available)
  collection 1.17.0 (1.17.1 available)
  completion 1.0.0 (1.0.1 available)
  coverage 1.6.1 (1.6.3 available)
  dds 2.5.0 (2.7.6 available)
  dds_service_extensions 1.3.1 (1.3.3 available)
  devtools_shared 2.18.0 (2.22.2 available)
  dwds 16.0.2+1 (18.0.0 available)
  fixnum 1.0.1 (1.1.0 available)
  frontend_server_client 3.1.0 (3.2.0 available)
  html 0.15.1 (0.15.2 available)
  intl 0.17.0 (0.18.0 available)
  io 1.0.3 (1.0.4 available)
  js 0.6.5 (0.6.7 available)
  json_annotation 4.7.0 (4.8.0 available)
  logging 1.1.0 (1.1.1 available)
  matcher 0.12.13 (0.12.14 available)
  meta 1.8.0 (1.9.0 available)
  mime 1.0.2 (1.0.4 available)
  multicast_dns 0.3.2+2 (0.3.2+3 available)
  native_stack_traces 0.5.2 (0.5.5 available)
  node_preamble 2.0.1 (2.0.2 available)
  path 1.8.2 (1.8.3 available)
  petitparser 5.1.0 (5.3.0 available)
  pubspec_parse 1.2.1 (1.2.2 available)
  source_maps 0.10.11 (0.10.12 available)
  sse 4.1.1 (4.1.2 available)
  test 1.22.0 (1.23.1 available)
  test_api 0.4.16 (0.4.18 available)
  test_core 0.4.20 (0.4.24 available)
  vm_service 9.4.0 (11.2.0 available)
  web_socket_channel 2.2.0 (2.3.0 available)
  webdriver 3.0.1 (3.0.2 available)
Got dependencies in packages/flutter_tools!
Running "flutter pub get" in flutter...
Resolving dependencies... (13.7s)
  _fe_analyzer_shared 52.0.0 (55.0.0 available)
  analyzer 5.4.0 (5.7.1 available)
  args 2.3.2 (2.4.0 available)
  build_daemon 3.1.0 (3.1.1 available)
  build_resolvers 2.1.0 (2.2.0 available)
  build_runner 2.3.3 (2.4.0 available)
  built_value 8.4.3 (8.4.4 available)
  characters 1.2.1 (1.3.0 available)
  cli_util 0.3.5 (0.4.0 available)
  collection 1.17.0 (1.17.1 available)
  cross_file 0.3.3+2 (0.3.3+4 available)
  dart_style 2.2.4 (2.2.5 available)
  desktop_drop 0.3.3 (0.4.1 available)
  device_info_plus 4.1.3 (8.1.0 available)
  device_info_plus_linux 3.0.0 (5.0.0 available)
  device_info_plus_macos 3.0.0 (5.0.0 available)
  device_info_plus_platform_interface 3.0.0 (7.0.0 available)
  device_info_plus_web 3.0.0 (5.0.0 available)
  device_info_plus_windows 4.1.0 (6.0.0 available)
  ffigen 7.2.4 (7.2.7 available)
  fixnum 1.0.1 (1.1.0 available)
  flutter_launcher_icons 0.11.0 (0.12.0 available)
  flutter_plugin_android_lifecycle 2.0.7 (2.0.9 available)
  flutter_rust_bridge 1.62.0 (1.68.0 available)
  flutter_svg 1.1.6 (2.0.3 available)
  html 0.15.1 (0.15.2 available)
  icons_launcher 2.0.6 (2.1.0 available)
  image 3.3.0 (4.0.15 available)
  image_picker 0.8.6+1 (0.8.7 available)
  image_picker_android 0.8.5+5 (0.8.6 available)
  image_picker_for_web 2.1.10 (2.1.12 available)
  image_picker_ios 0.8.6+6 (0.8.7+1 available)
  image_picker_platform_interface 2.6.2 (2.6.3 available)
  intl 0.17.0 (0.18.0 available)
  js 0.6.5 (0.6.7 available)
  meta 1.8.0 (1.9.0 available)
  package_info_plus 1.4.3+1 (3.0.3 available)
  package_info_plus_linux 1.0.5 (2.0.0 available)
  package_info_plus_macos 1.3.0 (2.0.0 available)
  package_info_plus_platform_interface 1.0.2 (2.0.1 available)
  package_info_plus_web 1.0.6 (2.0.0 available)
  package_info_plus_windows 2.1.0 (3.0.0 available)
  path 1.8.2 (1.8.3 available)
  path_provider 2.0.12 (2.0.13 available)
  path_provider_android 2.0.22 (2.0.24 available)
  path_provider_foundation 2.1.1 (2.1.3 available)
  path_provider_linux 2.1.7 (2.1.10 available)
  path_provider_platform_interface 2.0.5 (2.0.6 available)
  path_provider_windows 2.1.3 (2.1.5 available)
  percent_indicator 4.2.2 (4.2.3 available)
  petitparser 5.1.0 (5.3.0 available)
  plugin_platform_interface 2.1.3 (2.1.4 available)
  pubspec_parse 1.2.1 (1.2.2 available)
  puppeteer 2.21.0 (2.23.0 available)
  source_gen 1.2.6 (1.2.7 available)
  sqflite 2.2.4+1 (2.2.5 available)
  toggle_switch 1.4.0 (2.0.1 available)
  uni_links_desktop 0.1.4 (0.1.6 available)
  universal_io 2.0.4 (2.2.0 available)
  url_launcher 6.1.8 (6.1.10 available)
  url_launcher_android 6.0.23 (6.0.25 available)
  url_launcher_ios 6.0.18 (6.1.2 available)
  url_launcher_linux 3.0.2 (3.0.4 available)
  url_launcher_macos 3.0.2 (3.0.4 available)
  url_launcher_platform_interface 2.1.1 (2.1.2 available)
  url_launcher_web 2.0.14 (2.0.16 available)
  url_launcher_windows 3.0.3 (3.0.5 available)
  video_player 2.5.1 (2.5.3 available)
  video_player_android 2.3.10 (2.3.12 available)
  video_player_avfoundation 2.3.8 (2.4.1 available)
  video_player_platform_interface 6.0.1 (6.0.2 available)
  video_player_web 2.0.13 (2.0.15 available)
  visibility_detector 0.3.3 (0.4.0+2 available)
  win32 3.1.3 (4.1.1 available)
  win32_registry 1.0.2 (1.1.0 available)
  xdg_directories 0.2.0+3 (1.0.0 available)
  yaml_edit 2.0.3 (2.1.0 available)
  zxing2 0.1.1 (0.2.0 available)
Got dependencies!
$ cd ..
$ cargo build --features flutter --release
  [INFO] Generating SDK summary completed, took 9.2s

  [INFO] 10.3s elapsed, 31/32 actions completed.
  [INFO] 12.0s elapsed, 32/48 actions completed.
  [INFO] 13.8s elapsed, 47/48 actions completed.
  [INFO] 14.8s elapsed, 79/95 actions completed.
  [SEVERE] freezed on bin/cache/dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart:

  This builder requires Dart inputs without syntax errors.
  However, asset:flutter_hbb/bin/cache/dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart (or an existing part) contains the following errors.
  web_audio_dart2js.dart:53:20: Native functions can only be declared in the SDK and code that is loaded through native extensions.
  web_audio_dart2js.dart:55:27: Native functions can only be declared in the SDK and code that is loaded through native extensions.
  web_audio_dart2js.dart:57:30: Native functions can only be declared in the SDK and code that is loaded through native extensions.
  And 173 more...

  Try fixing the errors and re-running the build.

  [INFO] 17.4s elapsed, 133/149 actions completed.
  [INFO] 18.4s elapsed, 144/158 actions completed.
  [INFO] 20.2s elapsed, 149/165 actions completed.
  [SEVERE] freezed on bin/cache/dart-sdk/lib/html/dart2js/html_dart2js.dart:

  This builder requires Dart inputs without syntax errors.
  However, asset:flutter_hbb/bin/cache/dart-sdk/lib/html/dart2js/html_dart2js.dart (or an existing part) contains the following errors.
  html_dart2js.dart:118:21: Native functions can only be declared in the SDK and code that is loaded through native extensions.
  html_dart2js.dart:119:28: Native functions can only be declared in the SDK and code that is loaded through native extensions.
  html_dart2js.dart:148:51: Native functions can only be declared in the SDK and code that is loaded through native extensions.
  And 3570 more...
[…]

How to Reproduce

See above.

Expected Behavior

The build should succeed.

Operating system(s) on local side and remote side

GNU/Linux

RustDesk Version(s) on local side and remote side

It’s a build issue with current git branch

Screenshots

Not necessary.

Additional Context

No response

Originally created by @paulmenzel on GitHub (Mar 10, 2023). ### Bug Description Using Flutter 3.7.7, trying to build Rustdesk from source, it fails with the error below: ``` $ git log --oneline --no-decorate -1 6734dd01 Merge branch 'master' of github.com-rustdesk:rustdesk/rustdesk $ wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.7.7-stable.tar.xz $ tar xf flutter_linux_3.7.7-stable.tar.xz $ export PATH=/…/rustdesk/flutter/bin:$PATH $ cd flutter $ flutter pub get Running "flutter pub get" in flutter_tools... Resolving dependencies in packages/flutter_tools... (2.0s) _fe_analyzer_shared 50.0.0 (55.0.0 available) analyzer 5.2.0 (5.7.1 available) archive 3.3.2 (3.3.6 available) args 2.3.1 (2.4.0 available) built_value 8.4.2 (8.4.4 available) checked_yaml 2.0.1 (2.0.2 available) collection 1.17.0 (1.17.1 available) completion 1.0.0 (1.0.1 available) coverage 1.6.1 (1.6.3 available) dds 2.5.0 (2.7.6 available) dds_service_extensions 1.3.1 (1.3.3 available) devtools_shared 2.18.0 (2.22.2 available) dwds 16.0.2+1 (18.0.0 available) fixnum 1.0.1 (1.1.0 available) frontend_server_client 3.1.0 (3.2.0 available) html 0.15.1 (0.15.2 available) intl 0.17.0 (0.18.0 available) io 1.0.3 (1.0.4 available) js 0.6.5 (0.6.7 available) json_annotation 4.7.0 (4.8.0 available) logging 1.1.0 (1.1.1 available) matcher 0.12.13 (0.12.14 available) meta 1.8.0 (1.9.0 available) mime 1.0.2 (1.0.4 available) multicast_dns 0.3.2+2 (0.3.2+3 available) native_stack_traces 0.5.2 (0.5.5 available) node_preamble 2.0.1 (2.0.2 available) path 1.8.2 (1.8.3 available) petitparser 5.1.0 (5.3.0 available) pubspec_parse 1.2.1 (1.2.2 available) source_maps 0.10.11 (0.10.12 available) sse 4.1.1 (4.1.2 available) test 1.22.0 (1.23.1 available) test_api 0.4.16 (0.4.18 available) test_core 0.4.20 (0.4.24 available) vm_service 9.4.0 (11.2.0 available) web_socket_channel 2.2.0 (2.3.0 available) webdriver 3.0.1 (3.0.2 available) Got dependencies in packages/flutter_tools! Running "flutter pub get" in flutter... Resolving dependencies... (13.7s) _fe_analyzer_shared 52.0.0 (55.0.0 available) analyzer 5.4.0 (5.7.1 available) args 2.3.2 (2.4.0 available) build_daemon 3.1.0 (3.1.1 available) build_resolvers 2.1.0 (2.2.0 available) build_runner 2.3.3 (2.4.0 available) built_value 8.4.3 (8.4.4 available) characters 1.2.1 (1.3.0 available) cli_util 0.3.5 (0.4.0 available) collection 1.17.0 (1.17.1 available) cross_file 0.3.3+2 (0.3.3+4 available) dart_style 2.2.4 (2.2.5 available) desktop_drop 0.3.3 (0.4.1 available) device_info_plus 4.1.3 (8.1.0 available) device_info_plus_linux 3.0.0 (5.0.0 available) device_info_plus_macos 3.0.0 (5.0.0 available) device_info_plus_platform_interface 3.0.0 (7.0.0 available) device_info_plus_web 3.0.0 (5.0.0 available) device_info_plus_windows 4.1.0 (6.0.0 available) ffigen 7.2.4 (7.2.7 available) fixnum 1.0.1 (1.1.0 available) flutter_launcher_icons 0.11.0 (0.12.0 available) flutter_plugin_android_lifecycle 2.0.7 (2.0.9 available) flutter_rust_bridge 1.62.0 (1.68.0 available) flutter_svg 1.1.6 (2.0.3 available) html 0.15.1 (0.15.2 available) icons_launcher 2.0.6 (2.1.0 available) image 3.3.0 (4.0.15 available) image_picker 0.8.6+1 (0.8.7 available) image_picker_android 0.8.5+5 (0.8.6 available) image_picker_for_web 2.1.10 (2.1.12 available) image_picker_ios 0.8.6+6 (0.8.7+1 available) image_picker_platform_interface 2.6.2 (2.6.3 available) intl 0.17.0 (0.18.0 available) js 0.6.5 (0.6.7 available) meta 1.8.0 (1.9.0 available) package_info_plus 1.4.3+1 (3.0.3 available) package_info_plus_linux 1.0.5 (2.0.0 available) package_info_plus_macos 1.3.0 (2.0.0 available) package_info_plus_platform_interface 1.0.2 (2.0.1 available) package_info_plus_web 1.0.6 (2.0.0 available) package_info_plus_windows 2.1.0 (3.0.0 available) path 1.8.2 (1.8.3 available) path_provider 2.0.12 (2.0.13 available) path_provider_android 2.0.22 (2.0.24 available) path_provider_foundation 2.1.1 (2.1.3 available) path_provider_linux 2.1.7 (2.1.10 available) path_provider_platform_interface 2.0.5 (2.0.6 available) path_provider_windows 2.1.3 (2.1.5 available) percent_indicator 4.2.2 (4.2.3 available) petitparser 5.1.0 (5.3.0 available) plugin_platform_interface 2.1.3 (2.1.4 available) pubspec_parse 1.2.1 (1.2.2 available) puppeteer 2.21.0 (2.23.0 available) source_gen 1.2.6 (1.2.7 available) sqflite 2.2.4+1 (2.2.5 available) toggle_switch 1.4.0 (2.0.1 available) uni_links_desktop 0.1.4 (0.1.6 available) universal_io 2.0.4 (2.2.0 available) url_launcher 6.1.8 (6.1.10 available) url_launcher_android 6.0.23 (6.0.25 available) url_launcher_ios 6.0.18 (6.1.2 available) url_launcher_linux 3.0.2 (3.0.4 available) url_launcher_macos 3.0.2 (3.0.4 available) url_launcher_platform_interface 2.1.1 (2.1.2 available) url_launcher_web 2.0.14 (2.0.16 available) url_launcher_windows 3.0.3 (3.0.5 available) video_player 2.5.1 (2.5.3 available) video_player_android 2.3.10 (2.3.12 available) video_player_avfoundation 2.3.8 (2.4.1 available) video_player_platform_interface 6.0.1 (6.0.2 available) video_player_web 2.0.13 (2.0.15 available) visibility_detector 0.3.3 (0.4.0+2 available) win32 3.1.3 (4.1.1 available) win32_registry 1.0.2 (1.1.0 available) xdg_directories 0.2.0+3 (1.0.0 available) yaml_edit 2.0.3 (2.1.0 available) zxing2 0.1.1 (0.2.0 available) Got dependencies! $ cd .. $ cargo build --features flutter --release [INFO] Generating SDK summary completed, took 9.2s [INFO] 10.3s elapsed, 31/32 actions completed. [INFO] 12.0s elapsed, 32/48 actions completed. [INFO] 13.8s elapsed, 47/48 actions completed. [INFO] 14.8s elapsed, 79/95 actions completed. [SEVERE] freezed on bin/cache/dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart: This builder requires Dart inputs without syntax errors. However, asset:flutter_hbb/bin/cache/dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart (or an existing part) contains the following errors. web_audio_dart2js.dart:53:20: Native functions can only be declared in the SDK and code that is loaded through native extensions. web_audio_dart2js.dart:55:27: Native functions can only be declared in the SDK and code that is loaded through native extensions. web_audio_dart2js.dart:57:30: Native functions can only be declared in the SDK and code that is loaded through native extensions. And 173 more... Try fixing the errors and re-running the build. [INFO] 17.4s elapsed, 133/149 actions completed. [INFO] 18.4s elapsed, 144/158 actions completed. [INFO] 20.2s elapsed, 149/165 actions completed. [SEVERE] freezed on bin/cache/dart-sdk/lib/html/dart2js/html_dart2js.dart: This builder requires Dart inputs without syntax errors. However, asset:flutter_hbb/bin/cache/dart-sdk/lib/html/dart2js/html_dart2js.dart (or an existing part) contains the following errors. html_dart2js.dart:118:21: Native functions can only be declared in the SDK and code that is loaded through native extensions. html_dart2js.dart:119:28: Native functions can only be declared in the SDK and code that is loaded through native extensions. html_dart2js.dart:148:51: Native functions can only be declared in the SDK and code that is loaded through native extensions. And 3570 more... […] ``` ### How to Reproduce See above. ### Expected Behavior The build should succeed. ### Operating system(s) on local side and remote side GNU/Linux ### RustDesk Version(s) on local side and remote side It’s a build issue with current git branch ### Screenshots Not necessary. ### Additional Context _No response_
deekerman 2026-02-20 23:28:41 -05:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@rustdesk commented on GitHub (Mar 10, 2023):

#763

@rustdesk commented on GitHub (Mar 10, 2023): #763
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rustdesk-rustdesk#1505
No description provided.