Skip to content

Install failing when trying to submit analytics #7126

Description

@c100k

How frequently does the bug occur?

Always

Description

When I install my application on a PaaS provider (monorepo), it fails at the postinstall step of realm because it's unable to submit analytics.

It tries to read a file named dependencies.yml but it's not present in the location where it tries to read it from.

In submit-analytics.ts, a small change could be made to avoid this at all : moving the check of whether analytics is disabled or not at the beginning of the function, way before the call to collectPlatformData().

This way, it won't even take time computing platform data just to return a few lines after, and by the same occasion prevent this kind of issue where analytics blocks a whole deployment pipeline.

Stacktrace & log output

2026-05-16T23:06:44.114+02:00 .../node_modules/realm install: Done
2026-05-16T23:06:44.200+02:00 .../node_modules/realm postinstall$ node ./scripts/submit-analytics.js
2026-05-16T23:06:44.555+02:00 .../node_modules/realm postinstall: Error: ENOENT: no such file or directory, open '/home/bas/app_123/node_modules/.pnpm/realm@12.15.0_react-native@0.84.1_@babel+core@7.29.0_@react-native-community+cli@20.1.3_1e97006014812da4c9934931d3a44920/node_modules/realm/bindgen/vendor/realm-core/dependencies.yml'
2026-05-16T23:06:44.555+02:00 .../node_modules/realm postinstall:     at Object.readFileSync (node:fs:436:20)
2026-05-16T23:06:44.555+02:00 .../node_modules/realm postinstall:     at getRealmCoreVersion (/home/bas/app_123/node_modules/.pnpm/realm@12.15.0_react-native@0.84.1_@babel+core@7.29.0_@react-native-community+cli@20.1.3_1e97006014812da4c9934931d3a44920/node_modules/realm/dist/scripts/submit-analytics.js:136:10)
2026-05-16T23:06:44.555+02:00 .../node_modules/realm postinstall:     at collectPlatformData (/home/bas/app_123/node_modules/.pnpm/realm@12.15.0_react-native@0.84.1_@babel+core@7.29.0_@react-native-community+cli@20.1.3_1e97006014812da4c9934931d3a44920/node_modules/realm/dist/scripts/submit-analytics.js:184:30)
2026-05-16T23:06:44.555+02:00 .../node_modules/realm postinstall:     at submitAnalytics (/home/bas/app_123/node_modules/.pnpm/realm@12.15.0_react-native@0.84.1_@babel+core@7.29.0_@react-native-community+cli@20.1.3_1e97006014812da4c9934931d3a44920/node_modules/realm/dist/scripts/submit-analytics.js:295:24)
2026-05-16T23:06:44.555+02:00 .../node_modules/realm postinstall:     at Object.<anonymous> (/home/bas/app_123/node_modules/.pnpm/realm@12.15.0_react-native@0.84.1_@babel+core@7.29.0_@react-native-community+cli@20.1.3_1e97006014812da4c9934931d3a44920/node_modules/realm/scripts/submit-analytics.js:24:3)
2026-05-16T23:06:44.555+02:00 .../node_modules/realm postinstall:     at Module._compile (node:internal/modules/cjs/loader:1829:14)
2026-05-16T23:06:44.559+02:00 .../node_modules/realm postinstall:     at Object..js (node:internal/modules/cjs/loader:1969:10)
2026-05-16T23:06:44.559+02:00 .../node_modules/realm postinstall:     at Module.load (node:internal/modules/cjs/loader:1552:32)
2026-05-16T23:06:44.559+02:00 .../node_modules/realm postinstall:     at Module._load (node:internal/modules/cjs/loader:1354:12)
2026-05-16T23:06:44.559+02:00 .../node_modules/realm postinstall:     at wrapModuleLoad (node:internal/modules/cjs/loader:255:19) {
2026-05-16T23:06:44.559+02:00 .../node_modules/realm postinstall:   errno: -2,
2026-05-16T23:06:44.559+02:00 .../node_modules/realm postinstall:   code: 'ENOENT',
2026-05-16T23:06:44.559+02:00 .../node_modules/realm postinstall:   syscall: 'open',
2026-05-16T23:06:44.559+02:00 .../node_modules/realm postinstall:   path: '/home/bas/app_123/node_modules/.pnpm/realm@12.15.0_react-native@0.84.1_@babel+core@7.29.0_@react-native-community+cli@20.1.3_1e97006014812da4c9934931d3a44920/node_modules/realm/bindgen/vendor/realm-core/dependencies.yml'
2026-05-16T23:06:44.559+02:00 .../node_modules/realm postinstall: }
2026-05-16T23:06:44.565+02:00 .../node_modules/realm postinstall: Done

Can you reproduce the bug?

Always

Reproduction Steps

No response

Version

12.15.0

What services are you using?

Local Database only

Are you using encryption?

Yes

Platform OS and version(s)

PaaS provider

Build environment

No response

Cocoapods version

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions