-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Show error on macOS if missing Local Network permissions #161846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| }) async { | ||
| final Completer<List<MDnsVmServiceDiscoveryResult>> completer = | ||
| Completer<List<MDnsVmServiceDiscoveryResult>>(); | ||
| unawaited( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's an error, the Future returned by runZonedGuarded never completes, hence the unawaited and Completer. See: https://dart.dev/libraries/async/zones#example-errors-cant-leave-error-zones
This is inspired by the tool's test context:
flutter/packages/flutter_tools/test/src/context.dart
Lines 130 to 175 in 9bf4e89
| // To catch all errors thrown by the test, even uncaught async errors, we use a zone. | |
| // | |
| // Zones introduce their own event loop, so we do not await futures created inside | |
| // the zone from outside the zone. Instead, we create a Completer outside the zone, | |
| // and have the test complete it when the test ends (in success or failure), and we | |
| // await that. | |
| final Completer<void> completer = Completer<void>(); | |
| runZonedGuarded<Future<dynamic>>( | |
| () async { | |
| try { | |
| return await context.run<dynamic>( | |
| // Apply the overrides to the test context in the zone since their | |
| // instantiation may reference items already stored on the context. | |
| overrides: overrides, | |
| name: 'test-specific overrides', | |
| body: () async { | |
| if (initializeFlutterRoot) { | |
| // Provide a sane default for the flutterRoot directory. Individual | |
| // tests can override this either in the test or during setup. | |
| Cache.flutterRoot ??= getFlutterRoot(); | |
| } | |
| return await testMethod(); | |
| }, | |
| ); | |
| } finally { | |
| // We do not need a catch { ... } block because the error zone | |
| // will catch all errors and send them to the completer below. | |
| // | |
| // See https://github.com/flutter/flutter/pull/141821/files#r1462288131. | |
| if (!completer.isCompleted) { | |
| completer.complete(); | |
| } | |
| } | |
| }, | |
| (Object error, StackTrace stackTrace) { | |
| // When things fail, it's ok to print to the console! | |
| print(error); // ignore: avoid_print | |
| print(stackTrace); // ignore: avoid_print | |
| _printBufferedErrors(context); | |
| if (!completer.isCompleted) { | |
| completer.completeError(error, stackTrace); | |
| } | |
| throw error; //ignore: only_throw_errors | |
| }, | |
| ); | |
| return completer.future; |
36ffb7c to
3b32c07
Compare
| bool useDeviceIPAsHost = false, | ||
| required Duration timeout, | ||
| bool quitOnFind = false, | ||
| }) async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This diff is confusing. The only change to _pollingVmService's arguments is that deviceVmservicePort was renamed to deviceVmServicePort. _pollingVmService and _doPollingVmService have the same arguments.
|
EDIT: @matanlurey spot-checked the |
bkonyi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! I'm looking forward to this no longer being our top crasher!
We should consider cherry picking this into stable if we can.
andrewkolos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Failed to create CP due to merge conflicts. |
) ### Background macOS Sequoia requires the user's permission to do multicast operations, which the Flutter tool does to connect to the Dart VM. If the app does not have permission to communicate with devices on the local network, the following happens: 1. Flutter tool starts a [multicast lookup](https://github.com/flutter/flutter/blob/bb2d34126cc8161dbe4a1bf23c925e48b732f670/packages/flutter_tools/lib/src/mdns_discovery.dart#L238-L241) 2. The mDNS client [sends data on the socket](https://github.com/flutter/packages/blob/973e8b59e24ba80d3c36a2bcfa914fcfd5e19943/packages/multicast_dns/lib/multicast_dns.dart#L219) 4. macOS blocks the operation. Dart's native socket implementation throws an `OSError` 5. Dart's `Socket.send` [catches the `OSError`](https://github.com/dart-lang/sdk/blob/da6dc03a15822d83d9180bd766c02d11aacdc06b/sdk/lib/_internal/vm/bin/socket_patch.dart#L1511-L1515), wraps it in a `SocketException`, and [schedules a microtask](https://github.com/dart-lang/sdk/blob/da6dc03a15822d83d9180bd766c02d11aacdc06b/sdk/lib/_internal/vm/bin/socket_patch.dart#L1513) that [reports the exception through the socket's stream](https://github.com/dart-lang/sdk/blob/95f00522676dff03f64fc715cb1835ad451faa4c/sdk/lib/_internal/vm/bin/socket_patch.dart#L3011) ([`Socket` is a `Stream`](https://api.dart.dev/dart-io/Socket-class.html)) 6. The mDNS client [does not listen to the socket stream's errors](https://github.com/flutter/packages/blob/973e8b59e24ba80d3c36a2bcfa914fcfd5e19943/packages/multicast_dns/lib/multicast_dns.dart#L155), so [the error is sent to the current `Zone`'s uncaught error handler](https://github.com/dart-lang/sdk/blob/95f00522676dff03f64fc715cb1835ad451faa4c/sdk/lib/async/stream_impl.dart#L553). ### Reproduction To reproduce this error on macOS... 1. Open System Settings > Privacy & Security > Local Network and toggle off Visual Studio Code 2. Run a Flutter app using a physical device ### Fix Ideally, we'd make `MDnsClient.lookup` throw an exception for this scenario. Unfortunately, the `MDnsClient` can have multiple lookup operations in parallel, and the `SocketException` doesn't give us enough information to match it back to a pending `MDnsClient` request. See flutter/packages#8450 as an attempt to solve this in the `MDnsClient` layer. Instead, this fix introduces a `Zone` in the tool to catch the socket's uncaught exception. Follow-up to flutter#157638 See: flutter#150131 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
) ### Background macOS Sequoia requires the user's permission to do multicast operations, which the Flutter tool does to connect to the Dart VM. If the app does not have permission to communicate with devices on the local network, the following happens: 1. Flutter tool starts a [multicast lookup](https://github.com/flutter/flutter/blob/bb2d34126cc8161dbe4a1bf23c925e48b732f670/packages/flutter_tools/lib/src/mdns_discovery.dart#L238-L241) 2. The mDNS client [sends data on the socket](https://github.com/flutter/packages/blob/973e8b59e24ba80d3c36a2bcfa914fcfd5e19943/packages/multicast_dns/lib/multicast_dns.dart#L219) 4. macOS blocks the operation. Dart's native socket implementation throws an `OSError` 5. Dart's `Socket.send` [catches the `OSError`](https://github.com/dart-lang/sdk/blob/da6dc03a15822d83d9180bd766c02d11aacdc06b/sdk/lib/_internal/vm/bin/socket_patch.dart#L1511-L1515), wraps it in a `SocketException`, and [schedules a microtask](https://github.com/dart-lang/sdk/blob/da6dc03a15822d83d9180bd766c02d11aacdc06b/sdk/lib/_internal/vm/bin/socket_patch.dart#L1513) that [reports the exception through the socket's stream](https://github.com/dart-lang/sdk/blob/95f00522676dff03f64fc715cb1835ad451faa4c/sdk/lib/_internal/vm/bin/socket_patch.dart#L3011) ([`Socket` is a `Stream`](https://api.dart.dev/dart-io/Socket-class.html)) 6. The mDNS client [does not listen to the socket stream's errors](https://github.com/flutter/packages/blob/973e8b59e24ba80d3c36a2bcfa914fcfd5e19943/packages/multicast_dns/lib/multicast_dns.dart#L155), so [the error is sent to the current `Zone`'s uncaught error handler](https://github.com/dart-lang/sdk/blob/95f00522676dff03f64fc715cb1835ad451faa4c/sdk/lib/async/stream_impl.dart#L553). ### Reproduction To reproduce this error on macOS... 1. Open System Settings > Privacy & Security > Local Network and toggle off Visual Studio Code 2. Run a Flutter app using a physical device ### Fix Ideally, we'd make `MDnsClient.lookup` throw an exception for this scenario. Unfortunately, the `MDnsClient` can have multiple lookup operations in parallel, and the `SocketException` doesn't give us enough information to match it back to a pending `MDnsClient` request. See flutter/packages#8450 as an attempt to solve this in the `MDnsClient` layer. Instead, this fix introduces a `Zone` in the tool to catch the socket's uncaught exception. Follow-up to flutter#157638 See: flutter#150131 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Manual roll requested by [email protected] flutter/flutter@c1561a4...c1ffaa9 2025-01-24 [email protected] Fix link to hotfix documentation best practices (flutter/flutter#162116) 2025-01-24 [email protected] Add integration test for cutout rotation evaluation (flutter/flutter#160354) 2025-01-24 [email protected] Reland "[Impeller] Migrate unit tests off of Skia geometry classes (#161855)" (flutter/flutter#162146) 2025-01-24 [email protected] Fix TextField intrinsic width when hint is not visible (flutter/flutter#161235) 2025-01-24 [email protected] When parsing flavors, handle Xcode build configurations that are not lowercase (flutter/flutter#161455) 2025-01-24 [email protected] [Impeller] Fix source offset in PathBuilder::AddPath (flutter/flutter#162052) 2025-01-24 [email protected] Add to Setup Path Example to Engine README (flutter/flutter#162115) 2025-01-23 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Unskip test. (#162106)" (flutter/flutter#162122) 2025-01-23 [email protected] feat: Add `hint` (Widget) property to InputDecoration (flutter/flutter#161424) 2025-01-23 [email protected] Fix skwasm target in wasm_debug_unopt build. (flutter/flutter#162100) 2025-01-23 [email protected] Marks Linux_android_emu android views to be unflaky (flutter/flutter#160493) 2025-01-23 [email protected] Unskip test. (flutter/flutter#162106) 2025-01-23 [email protected] Add ability to maintain bottom view padding in `NavigationBar` safe area (flutter/flutter#162076) 2025-01-23 [email protected] Roll pub packages (flutter/flutter#162095) 2025-01-23 [email protected] Delete an unused (manual) workflow, added missing copyright headers. (flutter/flutter#162050) 2025-01-23 [email protected] Android templates: update default Kotlin from 1.8.22 to 2.1.0, update default Gradle from 8.9 to 8.12 (flutter/flutter#160974) 2025-01-23 [email protected] flutter_tools: flutter_tester is a host artifact (flutter/flutter#162047) 2025-01-23 [email protected] [Impeller] Make glIsTexture mockable for use by the ReactorGLES.NameUntrackedHandle test (flutter/flutter#162082) 2025-01-23 [email protected] Remove "Mac Designed for iPad" as a discoverable `flutter run` device (flutter/flutter#161459) 2025-01-23 [email protected] Show error on macOS if missing Local Network permissions (flutter/flutter#161846) 2025-01-23 [email protected] Autocomplete keyboard navigation (flutter/flutter#159455) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
)⚠️ This targets branch `flutter-3.29-candidate.0` for the Flutter beta. Cherrypicks #161846 to `flutter-3.29-candidate.0`. **Impacted Users**: Users that use macOS Sequoia and haven't turned on Local Network permissions for their IDE or terminal app. See: #150131 **Impact Description**: Without this improved error message, `flutter run` outputs this error: `SocketException: Send failed, OS Error: No route to host, errno = 65`. **Workaround**: Turn on Local Network permissions for your IDE or terminal app. However, it's difficult for customers to discover this from the error message. **Risk**: This change could regress the tool's Dart VM discovery. **Test Coverage**: Yes added tests **Validation Steps**: In System Settings > Privacy & Security > Local Network, toggle off Visual Studio Code. In VS Code, run a Flutter app on a physical device.
…ter#162119)⚠️ This targets branch `flutter-3.29-candidate.0` for the Flutter beta. Cherrypicks flutter#161846 to `flutter-3.29-candidate.0`. **Impacted Users**: Users that use macOS Sequoia and haven't turned on Local Network permissions for their IDE or terminal app. See: flutter#150131 **Impact Description**: Without this improved error message, `flutter run` outputs this error: `SocketException: Send failed, OS Error: No route to host, errno = 65`. **Workaround**: Turn on Local Network permissions for your IDE or terminal app. However, it's difficult for customers to discover this from the error message. **Risk**: This change could regress the tool's Dart VM discovery. **Test Coverage**: Yes added tests **Validation Steps**: In System Settings > Privacy & Security > Local Network, toggle off Visual Studio Code. In VS Code, run a Flutter app on a physical device.
…119)⚠️ This targets branch `flutter-3.29-candidate.0` for the Flutter beta. Cherrypicks flutter/flutter#161846 to `flutter-3.29-candidate.0`. **Impacted Users**: Users that use macOS Sequoia and haven't turned on Local Network permissions for their IDE or terminal app. See: flutter/flutter#150131 **Impact Description**: Without this improved error message, `flutter run` outputs this error: `SocketException: Send failed, OS Error: No route to host, errno = 65`. **Workaround**: Turn on Local Network permissions for your IDE or terminal app. However, it's difficult for customers to discover this from the error message. **Risk**: This change could regress the tool's Dart VM discovery. **Test Coverage**: Yes added tests **Validation Steps**: In System Settings > Privacy & Security > Local Network, toggle off Visual Studio Code. In VS Code, run a Flutter app on a physical device.
) Manual roll requested by [email protected] flutter/flutter@c1561a4...c1ffaa9 2025-01-24 [email protected] Fix link to hotfix documentation best practices (flutter/flutter#162116) 2025-01-24 [email protected] Add integration test for cutout rotation evaluation (flutter/flutter#160354) 2025-01-24 [email protected] Reland "[Impeller] Migrate unit tests off of Skia geometry classes (#161855)" (flutter/flutter#162146) 2025-01-24 [email protected] Fix TextField intrinsic width when hint is not visible (flutter/flutter#161235) 2025-01-24 [email protected] When parsing flavors, handle Xcode build configurations that are not lowercase (flutter/flutter#161455) 2025-01-24 [email protected] [Impeller] Fix source offset in PathBuilder::AddPath (flutter/flutter#162052) 2025-01-24 [email protected] Add to Setup Path Example to Engine README (flutter/flutter#162115) 2025-01-23 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Unskip test. (#162106)" (flutter/flutter#162122) 2025-01-23 [email protected] feat: Add `hint` (Widget) property to InputDecoration (flutter/flutter#161424) 2025-01-23 [email protected] Fix skwasm target in wasm_debug_unopt build. (flutter/flutter#162100) 2025-01-23 [email protected] Marks Linux_android_emu android views to be unflaky (flutter/flutter#160493) 2025-01-23 [email protected] Unskip test. (flutter/flutter#162106) 2025-01-23 [email protected] Add ability to maintain bottom view padding in `NavigationBar` safe area (flutter/flutter#162076) 2025-01-23 [email protected] Roll pub packages (flutter/flutter#162095) 2025-01-23 [email protected] Delete an unused (manual) workflow, added missing copyright headers. (flutter/flutter#162050) 2025-01-23 [email protected] Android templates: update default Kotlin from 1.8.22 to 2.1.0, update default Gradle from 8.9 to 8.12 (flutter/flutter#160974) 2025-01-23 [email protected] flutter_tools: flutter_tester is a host artifact (flutter/flutter#162047) 2025-01-23 [email protected] [Impeller] Make glIsTexture mockable for use by the ReactorGLES.NameUntrackedHandle test (flutter/flutter#162082) 2025-01-23 [email protected] Remove "Mac Designed for iPad" as a discoverable `flutter run` device (flutter/flutter#161459) 2025-01-23 [email protected] Show error on macOS if missing Local Network permissions (flutter/flutter#161846) 2025-01-23 [email protected] Autocomplete keyboard navigation (flutter/flutter#159455) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
) Manual roll requested by [email protected] flutter/flutter@c1561a4...c1ffaa9 2025-01-24 [email protected] Fix link to hotfix documentation best practices (flutter/flutter#162116) 2025-01-24 [email protected] Add integration test for cutout rotation evaluation (flutter/flutter#160354) 2025-01-24 [email protected] Reland "[Impeller] Migrate unit tests off of Skia geometry classes (#161855)" (flutter/flutter#162146) 2025-01-24 [email protected] Fix TextField intrinsic width when hint is not visible (flutter/flutter#161235) 2025-01-24 [email protected] When parsing flavors, handle Xcode build configurations that are not lowercase (flutter/flutter#161455) 2025-01-24 [email protected] [Impeller] Fix source offset in PathBuilder::AddPath (flutter/flutter#162052) 2025-01-24 [email protected] Add to Setup Path Example to Engine README (flutter/flutter#162115) 2025-01-23 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Unskip test. (#162106)" (flutter/flutter#162122) 2025-01-23 [email protected] feat: Add `hint` (Widget) property to InputDecoration (flutter/flutter#161424) 2025-01-23 [email protected] Fix skwasm target in wasm_debug_unopt build. (flutter/flutter#162100) 2025-01-23 [email protected] Marks Linux_android_emu android views to be unflaky (flutter/flutter#160493) 2025-01-23 [email protected] Unskip test. (flutter/flutter#162106) 2025-01-23 [email protected] Add ability to maintain bottom view padding in `NavigationBar` safe area (flutter/flutter#162076) 2025-01-23 [email protected] Roll pub packages (flutter/flutter#162095) 2025-01-23 [email protected] Delete an unused (manual) workflow, added missing copyright headers. (flutter/flutter#162050) 2025-01-23 [email protected] Android templates: update default Kotlin from 1.8.22 to 2.1.0, update default Gradle from 8.9 to 8.12 (flutter/flutter#160974) 2025-01-23 [email protected] flutter_tools: flutter_tester is a host artifact (flutter/flutter#162047) 2025-01-23 [email protected] [Impeller] Make glIsTexture mockable for use by the ReactorGLES.NameUntrackedHandle test (flutter/flutter#162082) 2025-01-23 [email protected] Remove "Mac Designed for iPad" as a discoverable `flutter run` device (flutter/flutter#161459) 2025-01-23 [email protected] Show error on macOS if missing Local Network permissions (flutter/flutter#161846) 2025-01-23 [email protected] Autocomplete keyboard navigation (flutter/flutter#159455) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Background
macOS Sequoia requires the user's permission to do multicast operations, which the Flutter tool does to connect to the Dart VM. If the app does not have permission to communicate with devices on the local network, the following happens:
OSErrorSocket.sendcatches theOSError, wraps it in aSocketException, and schedules a microtask that reports the exception through the socket's stream (Socketis aStream)Zone's uncaught error handler.Reproduction
To reproduce this error on macOS...
Fix
Ideally, we'd make
MDnsClient.lookupthrow an exception for this scenario. Unfortunately, theMDnsClientcan have multiple lookup operations in parallel, and theSocketExceptiondoesn't give us enough information to match it back to a pendingMDnsClientrequest. See flutter/packages#8450 as an attempt to solve this in theMDnsClientlayer.Instead, this fix introduces a
Zonein the tool to catch the socket's uncaught exception.Follow-up to #157638
See: #150131
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.