diff --git a/pkgs/anisette-v3-server/default.nix b/pkgs/anisette-v3-server/default.nix index c2cb824..65ab7ae 100644 --- a/pkgs/anisette-v3-server/default.nix +++ b/pkgs/anisette-v3-server/default.nix @@ -19,12 +19,11 @@ buildDubPackage rec { dubLock = ./dub-lock.json; - # The reference Dockerfile builds with `dub build -c "static"` (statically - # linked D runtime). The Android-ELF loader does low-level symbol resolution - # and memory manipulation that is fragile with a dynamically-linked D runtime - # (GC/TLS conflicts), which can make the ADI provisioning step fail silently. - # Match the reference build config. - dubBuildFlags = [ "-c" "static" ]; + # TEMP diagnostic: log the swallowed provisioning exception to find the real + # cause of the silent provisioning failure. + postPatch = '' + patch -p1 < ${./log-provisioning-error.patch} + ''; buildInputs = [ zlib openssl_1_1 ]; diff --git a/pkgs/anisette-v3-server/log-provisioning-error.patch b/pkgs/anisette-v3-server/log-provisioning-error.patch new file mode 100644 index 0000000..b005d51 --- /dev/null +++ b/pkgs/anisette-v3-server/log-provisioning-error.patch @@ -0,0 +1,11 @@ +--- a/source/app.d ++++ b/source/app.d +@@ -156,7 +156,9 @@ + ProvisioningSession provisioningSession = new ProvisioningSession(v1Adi, v1Device); + provisioningSession.provision(dsId); + log.info("Provisioning done!"); +- } catch (Exception) {} ++ } catch (Exception e) { ++ log.error("Provisioning failed: %s", e.msg); ++ } + }