Skip to content

Javascript Heap Error on modules with circular linksΒ #66

@DanFlor

Description

@DanFlor

The react native schemes manager chokes loops out of control when it encounters circular symlinks within a node module.

Steps to reproduce the behavior

Install a node module with a circular link, such as react-native-http, which contains the obvious circular link:
react-native-http/example/get/node_modules/http-browserify/example/streaming/node_modules/http-browserify -> ../../..

Run react-native-schemes-manager all

Expected behavior

Script completes without error.

Actual behavior

Script meets untimely demise.

Hiding schemes from node_modules xcode projects.
iOS/XXXXXX.xcodeproj
 - [fix-script]: iOS/XXXXXX.xcodeproj skipped

<--- Last few GCs --->

[68345:0x103801e00]   151252 ms: Mark-sweep 1493.3 (1572.4) -> 1493.2 (1541.4) MB, 1981.5 / 0.7 ms  last resort GC in old space requested
[68345:0x103801e00]   153191 ms: Mark-sweep 1493.2 (1541.4) -> 1493.2 (1541.4) MB, 1938.3 / 0.4 ms  last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x13bb3fca58b9 <JSObject>
    1: _readdirEntries [/Users/XXXXXX/Projects/XXXXXX/XXXXXX/XXXXXX/node_modules/glob/glob.js:~559] [pc=0x70da8a28c7e](this=0x13bb3ad956f9 <Glob map = 0x13bbc89233b9>,abs=0x13bbfb9844f1 <String[392]: /Users/XXXXXX/Projects/XXXXXX/XXXXXX/XXXXXX/node_modules/react-native-http/example/get/node_modules/http-browserify/example/streaming/node_modules/http-browse...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions