objectbox / objectbox-dart

Flutter database for super-fast Dart object persistence
https://docs.objectbox.io/getting-started
Apache License 2.0
927 stars 115 forks source link

Can't run the generator due to HandshakeException #542

Closed virtualmarc closed 11 months ago

virtualmarc commented 11 months ago

When I want to run the build runner and generate the sources, the object box generator fails with a HandshakeException and no sources are generated:

[INFO] Generating build script completed, took 174ms
[INFO] Reading cached asset graph completed, took 1.0s
[INFO] Checking for updates since last build completed, took 759ms
[INFO] Running build completed, took 34ms
[INFO] Caching finalized dependency graph completed, took 374ms
[SEVERE] objectbox_generator:generator on lib/$lib$ (cached):

HandshakeException: Handshake error in client (OS Error: 
        CERTIFICATE_VERIFY_FAILED: application verification failure(handshake.cc:393))
[SEVERE] Failed after 414ms

After some inspection of the generator code I could work around it by editing the analysis.dart and add a return null; at the beginning of sendEvent.

The Build should not depend on external resources, especially tracking pages.

In many enterprise environments build and developer systems are limited and have no or restricted internet access. In my case the internet access is scanned by an interception proxy breaking the TLS traffic.

Basic info:

Steps to reproduce

  1. Block internet access or intercept TLS Traffic
  2. Run the build runner

Expected behavior

Access to unnecessary external resources should not fail the build process.

Tracking should be opt-in by GDPR (and the german DSGVO) Law and is not allowed to be always active without user input.

greenrobot-team commented 11 months ago

Thanks for reporting, I could reproduce! This will be fixed with the next update.

Also based on our understanding the event contains no personally identifiable information so the GDPR does not apply here.

virtualmarc commented 11 months ago

The event contains the full pubspec.yaml file which is personally identifiable.

Theres also a unique user id generated on the first build to track user's across multiple projects. This is a direct identification of a single user.

greenrobot-team commented 11 months ago

Here is an example from my machine:

[{"event":"Build","properties":{"distinct_id":"uhSFb+jsjGA","Tool":"Dart Generator","Version":"2.0.0","Dart":"3.0.0","Flutter":"false","BuildOS":"windows","BuildOSVersion":"\"Windows 10 Pro\" 10.0 (Build 22621)","lang":"de","c":"DE"}}]

The distinct ID allows to de-duplicate events, yes. However, it does not allow us (and we also do not intend to) in any way to find out who you are (e.g. your name, address, email address, etc.)

greenrobot-team commented 11 months ago

Fix available with release 2.1.0! Get it with flutter pub upgrade (or dart pub upgrade for Dart Native projects).