text:
error on create new project with create-react-native-app

Is this a bug report?
yes

Have you read the Contributing Guidelines?
yes
Environment

Steps to Reproduce
I have created new project with react native and run create-react-native-app awesome-project but encounter this errors.I had no problems before!
(Write your steps here:)
1.npm install -g create-react-native-app
2.create-react-native-app test5
3.
Expected Behavior

(Write what you thought would happen.)
Actual Behavior
Create a new React Native app
Using package manager as npm with npm interface.
Installing packages. This might take a couple minutes.
Installing react-native-scripts...

npm WARN deprecated tar.gz@1.0.7: ⚠  WARNING ⚠ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
test5@0.1.0 C:\Users\admin\Desktop\test5
`-- react-native-scripts@1.7.0
  +-- @expo/bunyan@1.8.10
  | +-- moment@2.19.1
  | +-- mv@2.1.1
  | | `-- rimraf@2.4.5
  | |   `-- glob@6.0.4
  | `-- safe-json-stringify@1.0.4
  +-- babel-runtime@6.26.0
  | +-- core-js@2.5.1
  | `-- regenerator-runtime@0.11.0
  +-- chalk@2.3.0
  | +-- ansi-styles@3.2.0
  | | `-- color-convert@1.9.0
  | |   `-- color-name@1.1.3
  | +-- escape-string-regexp@1.0.5
  | `-- supports-color@4.5.0
  |   `-- has-flag@2.0.0
  +-- cross-spawn@5.1.0
  | +-- lru-cache@4.1.1
  | | +-- pseudomap@1.0.2
  | | `-- yallist@2.1.2
  | +-- shebang-command@1.2.0
  | | `-- shebang-regex@1.0.0
  | `-- which@1.3.0
  |   `-- isexe@2.0.0
  +-- fs-extra@3.0.1
  | +-- graceful-fs@4.1.11
  | +-- jsonfile@3.0.1
  | `-- universalify@0.1.1
  +-- indent-string@3.2.0
  +-- inquirer@3.3.0
  | +-- ansi-escapes@3.0.0
  | +-- cli-cursor@2.1.0
  | | `-- restore-cursor@2.0.0
  | |   +-- onetime@2.0.1
  | |   | `-- mimic-fn@1.1.0
  | |   `-- signal-exit@3.0.2
  | +-- cli-width@2.2.0
  | +-- external-editor@2.0.5
  | | +-- iconv-lite@0.4.19
  | | +-- jschardet@1.6.0
  | | `-- tmp@0.0.33
  | |   `-- os-tmpdir@1.0.2
  | +-- figures@2.0.0
  | +-- mute-stream@0.0.7
  | +-- run-async@2.3.0
  | | `-- is-promise@2.1.0
  | +-- rx-lite@4.0.8
  | +-- rx-lite-aggregates@4.0.8
  | +-- string-width@2.1.1
  | | `-- is-fullwidth-code-point@2.0.0
  | +-- strip-ansi@4.0.0
  | | `-- ansi-regex@3.0.0
  | `-- through@2.3.8
  +-- lodash@4.17.4
  +-- match-require@2.1.0
  | `-- uuid@3.1.0
  +-- minimist@1.2.0
  +-- path-exists@3.0.0
  +-- progress@2.0.0
  +-- qrcode-terminal@0.11.0
  +-- rimraf@2.6.2
  | `-- glob@7.1.2
  |   +-- fs.realpath@1.0.0
  |   +-- inflight@1.0.6
  |   | `-- wrappy@1.0.2
  |   +-- inherits@2.0.3
  |   +-- minimatch@3.0.4
  |   | `-- brace-expansion@1.1.8
  |   |   +-- balanced-match@1.0.0
  |   |   `-- concat-map@0.0.1
  |   +-- once@1.4.0
  |   `-- path-is-absolute@1.0.1
  `-- xdl@46.0.1
    +-- @expo/json-file@5.3.0
    | `-- json5@0.5.1
    +-- @expo/osascript@1.8.1
    | `-- exec-async@2.2.0
    +-- @expo/schemer@1.1.0
    | +-- ajv@5.3.0
    | | +-- co@4.6.0
    | | +-- fast-deep-equal@1.0.0
    | | +-- fast-json-stable-stringify@2.0.0
    | | `-- json-schema-traverse@0.3.1
    | +-- babel-polyfill@6.26.0
    | | `-- regenerator-runtime@0.10.5
    | +-- babel-preset-flow@6.23.0
    | | `-- babel-plugin-transform-flow-strip-types@6.22.0
    | |   `-- babel-plugin-syntax-flow@6.18.0
    | +-- file-type@5.2.0
    | +-- instapromise@2.0.7
    | `-- probe-image-size@3.1.0
    |   +-- deepmerge@1.5.2
    |   +-- got@7.1.0
    |   | +-- decompress-response@3.3.0
    |   | | `-- mimic-response@1.0.0
    |   | +-- duplexer3@0.1.4
    |   | +-- get-stream@3.0.0
    |   | +-- is-plain-obj@1.1.0
    |   | +-- is-retry-allowed@1.1.0
    |   | +-- is-stream@1.1.0
    |   | +-- isurl@1.0.0
    |   | | +-- has-to-string-tag-x@1.4.1
    |   | | | `-- has-symbol-support-x@1.4.1
    |   | | `-- is-object@1.0.1
    |   | +-- lowercase-keys@1.0.0
    |   | +-- p-cancelable@0.3.0
    |   | +-- p-timeout@1.2.0
    |   | | `-- p-finally@1.0.0
    |   | +-- url-parse-lax@1.0.0
    |   | | `-- prepend-http@1.0.4
    |   | `-- url-to-options@1.0.1
    |   +-- next-tick@1.0.0
    |   `-- stream-parser@0.3.1
    +-- @expo/spawn-async@1.3.0
    +-- analytics-node@2.4.1
    | +-- @segment/loosely-validate-event@1.1.2
    | | +-- component-type@1.2.1
    | | `-- join-component@1.1.0
    | +-- clone@2.1.1
    | +-- commander@2.11.0
    | +-- crypto-token@1.0.1
    | +-- debug@2.6.9
    | +-- remove-trailing-slash@0.1.0
    | +-- superagent@3.8.0
    | | +-- component-emitter@1.2.1
    | | +-- cookiejar@2.1.1
    | | +-- debug@3.1.0
    | | +-- formidable@1.1.1
    | | +-- mime@1.4.1
    | | `-- readable-stream@2.3.3
    | |   +-- core-util-is@1.0.2
    | |   +-- isarray@1.0.0
    | |   +-- process-nextick-args@1.0.7
    | |   +-- string_decoder@1.0.3
    | |   `-- util-deprecate@1.0.2
    | `-- superagent-retry@0.6.0
    +-- auth0@2.8.0
    | +-- bluebird@2.11.0
    | +-- lru-memoizer@1.11.1
    | | +-- lock@0.1.4
    | | +-- lodash@4.5.1
    | | +-- lru-cache@4.0.2
    | | `-- very-fast-args@1.1.0
    | +-- object.assign@4.0.4
    | | +-- define-properties@1.1.2
    | | | `-- foreach@2.0.5
    | | +-- function-bind@1.1.1
    | | `-- object-keys@1.0.11
    | `-- rest-facade@1.10.1
    |   +-- bluebird@2.11.0
    |   +-- change-case@2.3.1
    |   | +-- camel-case@1.2.2
    |   | +-- constant-case@1.1.2
    |   | +-- dot-case@1.1.2
    |   | +-- is-lower-case@1.1.3
    |   | +-- is-upper-case@1.1.2
    |   | +-- lower-case@1.1.4
    |   | +-- lower-case-first@1.0.2
    |   | +-- param-case@1.1.2
    |   | +-- pascal-case@1.1.2
    |   | +-- path-case@1.1.2
    |   | +-- sentence-case@1.1.3
    |   | +-- snake-case@1.1.2
    |   | +-- swap-case@1.1.2
    |   | +-- title-case@1.1.2
    |   | +-- upper-case@1.1.3
    |   | `-- upper-case-first@1.1.2
    |   `-- superagent-proxy@1.0.2
    |     `-- proxy-agent@2.1.0
    |       +-- agent-base@2.1.1
    |       | `-- semver@5.0.3
    |       +-- http-proxy-agent@1.0.0
    |       +-- https-proxy-agent@1.0.0
    |       +-- lru-cache@2.6.5
    |       +-- pac-proxy-agent@2.0.0
    |       | +-- get-uri@2.0.1
    |       | | +-- data-uri-to-buffer@1.2.0
    |       | | +-- file-uri-to-path@1.0.0
    |       | | `-- ftp@0.3.10
    |       | |   +-- readable-stream@1.1.14
    |       | |   | +-- isarray@0.0.1
    |       | |   | `-- string_decoder@0.10.31
    |       | |   `-- xregexp@2.0.0
    |       | +-- pac-resolver@3.0.0
    |       | | +-- degenerator@1.0.4
    |       | | | +-- ast-types@0.9.14
    |       | | | +-- escodegen@1.9.0
    |       | | | | +-- estraverse@4.2.0
    |       | | | | +-- esutils@2.0.2
    |       | | | | `-- optionator@0.8.2
    |       | | | |   +-- deep-is@0.1.3
    |       | | | |   +-- fast-levenshtein@2.0.6
    |       | | | |   +-- levn@0.3.0
    |       | | | |   +-- prelude-ls@1.1.2
    |       | | | |   +-- type-check@0.3.2
    |       | | | |   `-- wordwrap@1.0.0
    |       | | | `-- esprima@3.1.3
    |       | | +-- ip@1.1.5
    |       | | +-- netmask@1.0.6
    |       | | `-- thunkify@2.1.2
    |       | `-- socks-proxy-agent@3.0.1
    |       |   `-- agent-base@4.1.1
    |       |     `-- es6-promisify@5.0.0
    |       |       `-- es6-promise@4.1.1
    |       `-- socks-proxy-agent@2.1.1
    |         `-- socks@1.1.10
    |           `-- smart-buffer@1.1.15
    +-- auth0-js@7.6.1
    | +-- Base64@0.1.4
    | +-- json-fallback@0.0.1
    | +-- jsonp@0.0.4
    | +-- qs@6.5.1
    | +-- reqwest@2.0.5
    | +-- trim@0.0.1
    | +-- winchan@0.1.4
    | `-- xtend@2.1.2
    |   `-- object-keys@0.4.0
    +-- bluebird@3.5.1
    +-- body-parser@1.18.2
    | +-- bytes@3.0.0
    | +-- content-type@1.0.4
    | +-- depd@1.1.1
    | +-- http-errors@1.6.2
    | | +-- setprototypeof@1.0.3
    | | `-- statuses@1.4.0
    | +-- on-finished@2.3.0
    | | `-- ee-first@1.1.1
    | +-- raw-body@2.3.2
    | | `-- unpipe@1.0.0
    | `-- type-is@1.6.15
    |   `-- media-typer@0.3.0
    +-- decache@4.3.0
    | `-- callsite@1.0.0
    +-- delay-async@1.1.0
    +-- es6-error@4.0.2
    +-- exists-async@2.0.0
    +-- express@4.16.2
    | +-- accepts@1.3.4
    | | `-- negotiator@0.6.1
    | +-- array-flatten@1.1.1
    | +-- content-disposition@0.5.2
    | +-- cookie@0.3.1
    | +-- cookie-signature@1.0.6
    | +-- encodeurl@1.0.1
    | +-- escape-html@1.0.3
    | +-- etag@1.8.1
    | +-- finalhandler@1.1.0
    | | `-- statuses@1.3.1
    | +-- fresh@0.5.2
    | +-- merge-descriptors@1.0.1
    | +-- methods@1.1.2
    | +-- parseurl@1.3.2
    | +-- path-to-regexp@0.1.7
    | +-- proxy-addr@2.0.2
    | | +-- forwarded@0.1.2
    | | `-- ipaddr.js@1.5.2
    | +-- range-parser@1.2.0
    | +-- safe-buffer@5.1.1
    | +-- send@0.16.1
    | | +-- destroy@1.0.4
    | | `-- statuses@1.3.1
    | +-- serve-static@1.13.1
    | +-- setprototypeof@1.1.0
    | +-- statuses@1.3.1
    | +-- utils-merge@1.0.1
    | `-- vary@1.1.2
    +-- file-type@4.4.0
    +-- freeport-async@1.1.1
    +-- fs-extra@0.30.0
    | `-- klaw@1.3.1
    +-- getenv@0.7.0
    +-- glob@7.1.2
    +-- hasbin@1.2.3
    | `-- async@1.5.2
    +-- home-dir@1.0.0
    +-- instapromise@2.0.7-rc.1
    +-- joi@10.6.0
    | +-- hoek@4.2.0
    | +-- isemail@2.2.1
    | +-- items@2.1.1
    | `-- topo@2.0.2
    +-- jsonfile@2.4.0
    +-- jsonschema@1.2.0
    +-- jsonwebtoken@7.4.3
    | +-- joi@6.10.1
    | | +-- hoek@2.16.3
    | | +-- isemail@1.2.0
    | | `-- topo@1.1.0
    | +-- jws@3.1.4
    | | +-- base64url@2.0.0
    | | `-- jwa@1.1.5
    | |   +-- buffer-equal-constant-time@1.0.1
    | |   `-- ecdsa-sig-formatter@1.0.9
    | +-- lodash.once@4.1.1
    | +-- ms@2.0.0
    | `-- xtend@4.0.1
    +-- md5hex@1.0.0
    +-- mkdirp@0.5.1
    | `-- minimist@0.0.8
    +-- mkdirp-promise@5.0.1
    +-- mz@2.7.0
    | +-- any-promise@1.3.0
    | +-- object-assign@4.1.1
    | `-- thenify-all@1.6.0
    |   `-- thenify@3.3.0
    +-- ncp@2.0.0
    +-- opn@4.0.2
    | `-- pinkie-promise@2.0.1
    |   `-- pinkie@2.0.4
    +-- plist@2.1.0
    | +-- base64-js@1.2.0
    | `-- xmlbuilder@8.2.2
    +-- querystring@0.2.0
    +-- raven@2.2.1
    | +-- lsmod@1.0.0
    | +-- stack-trace@0.0.9
    | +-- timed-out@4.0.1
    | `-- uuid@3.0.0
    +-- raven-js@3.19.1
    +-- UNMET PEER DEPENDENCY react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0
    +-- react-redux@5.0.6
    | +-- hoist-non-react-statics@2.3.1
    | +-- invariant@2.2.2
    | +-- lodash-es@4.17.4
    | +-- loose-envify@1.3.1
    | | `-- js-tokens@3.0.2
    | `-- prop-types@15.6.0
    |   `-- fbjs@0.8.16
    |     +-- core-js@1.2.7
    |     +-- isomorphic-fetch@2.2.1
    |     | +-- node-fetch@1.7.3
    |     | | `-- encoding@0.1.12
    |     | `-- whatwg-fetch@2.0.3
    |     +-- promise@7.3.1
    |     | `-- asap@2.0.6
    |     +-- setimmediate@1.0.5
    |     `-- ua-parser-js@0.7.17
    +-- read-chunk@2.1.0
    | `-- pify@3.0.0
    +-- redux@3.7.2
    | `-- symbol-observable@1.0.4
    +-- redux-logger@2.10.2
    | `-- deep-diff@0.3.4
    +-- request@2.83.0
    | +-- aws-sign2@0.7.0
    | +-- aws4@1.6.0
    | +-- caseless@0.12.0
    | +-- combined-stream@1.0.5
    | | `-- delayed-stream@1.0.0
    | +-- extend@3.0.1
    | +-- forever-agent@0.6.1
    | +-- form-data@2.3.1
    | | `-- asynckit@0.4.0
    | +-- har-validator@5.0.3
    | | `-- har-schema@2.0.0
    | +-- hawk@6.0.2
    | | +-- boom@4.3.1
    | | +-- cryptiles@3.1.2
    | | | `-- boom@5.2.0
    | | `-- sntp@2.1.0
    | +-- http-signature@1.2.0
    | | +-- assert-plus@1.0.0
    | | +-- jsprim@1.4.1
    | | | +-- extsprintf@1.3.0
    | | | +-- json-schema@0.2.3
    | | | `-- verror@1.10.0
    | | `-- sshpk@1.13.1
    | |   +-- asn1@0.2.3
    | |   +-- bcrypt-pbkdf@1.0.1
    | |   +-- dashdash@1.14.1
    | |   +-- ecc-jsbn@0.1.1
    | |   +-- getpass@0.1.7
    | |   +-- jsbn@0.1.1
    | |   `-- tweetnacl@0.14.5
    | +-- is-typedarray@1.0.0
    | +-- isstream@0.1.2
    | +-- json-stringify-safe@5.0.1
    | +-- mime-types@2.1.17
    | | `-- mime-db@1.30.0
    | +-- oauth-sign@0.8.2
    | +-- performance-now@2.1.0
    | +-- stringstream@0.0.5
    | +-- tough-cookie@2.3.3
    | | `-- punycode@1.4.1
    | `-- tunnel-agent@0.6.0
    +-- request-progress@3.0.0
    | `-- throttleit@1.0.0
    +-- semver@5.4.1
    +-- slugid@1.1.0
    | `-- uuid@2.0.3
    +-- slugify@1.2.1
    +-- source-map-support@0.4.18
    | `-- source-map@0.5.7
    +-- tar.gz@1.0.7
    | +-- bluebird@2.11.0
    | +-- fstream@1.0.11
    | +-- mout@0.11.1
    | `-- tar@2.2.1
    |   `-- block-stream@0.0.9
    +-- tree-kill@1.2.0
    +-- url@0.11.0
    | `-- punycode@1.3.2
    +-- xmldom@0.1.27
    `-- yesno@0.0.1

npm WARN react-redux@5.0.6 requires a peer of react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0 but none was installed.
Installing dependencies using npm...

npm WARN deprecated connect@2.30.2: connect 2.x series is deprecated
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.1 (node_modules\sane\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save"
npm ERR! node v6.11.5
npm ERR! npm  v3.10.10
npm ERR! code EREADFILE

npm ERR! Error extracting C:\Users\admin\AppData\Roaming\npm-cache\jest-expo\22.0.0\package.tgz archive: ENOENT: no such file or directory, open 'C:\Users\admin\AppData\Roaming\npm-cache\jest-expo\22.0.0\package.tgz'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\admin\Desktop\test5\npm-debug.log
Failed to install

(Write what happened. Add screenshots!)
Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

i am having the same issue.. please help me also to resolve the same..
Thanks in advance

I just started with a new react native project and experienced this same issue, how to solve this ?

same issue on windows

I couldn't do with npm yet, but you can use yarn that's worked.

I was using npm 3.x upgraded to 5.x but that does not work either as it's not supported.
Installed yarn instead and that works.
Clearly the main people on this project want you to use yarn and are not too concerned with npm users.

I'm having the same problem on Windows 10 with node 6.11.3

@bakerjay06074 install yarn for Windows and it should work.

Replace the version of jest-expo in package.json from 22.0.0 to 22.0.1 , it
will work
On Nov 8, 2017 9:50 AM, "Sean Diamond" notifications@github.com wrote:

@bakerjay06074 https://github.com/bakerjay06074 install yarn for
Windows and it should work.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/issues/16702#issuecomment-342706587,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJ2FduLVEoccOrOCJ0YvyNhOjk88jY8Mks5s0SwqgaJpZM4QTjN9
.

I came across this issue and solved with updating the node.js and install yarn on my new machine.

Had this issue on Mac, fixed it with @sahiltaneja07's suggestion

@PhilTheAir still use npm start?

@luckymore yarn start.


text:
Error: NetInfo.isConnected.fetch(...).done is not a function

I'm getting this after upgrading react-native to 0.7.1.
 Error: NetInfo.isConnected.fetch(...).done is not a function
 stack:
  Store.Reflux.createStore.init                                                index.ios.bundle:63454
  new                                                                          index.ios.bundle:43816
  Object.module.exports [as createStore]                                       index.ios.bundle:43828
  <unknown>                                                                    index.ios.bundle:63440

The code is this
    NetInfo.isConnected.fetch().done(
	(connected) => {this._changeConnectionStatus(connected); }
);

Interesting, when I make sure the first require call to this connectionstore is moved to within the componentDidMount of the React Class using it, the problem goes away. Seems like it wasn't ready yet, which must be some kind of change from 0.6.0.

@mschipperheyn - did you manage to resolve this? It looks like it is working as expected with UIExplorer on 0.8.0. Make sure you restart your packager and perhaps even XCode! Ping me if that doesn't fix it and I'll reopen.

Yeah, I still get this issue. I execute the function within a Reflux Store init statement.
If I use
NetInfo.isConnected.fetch().then(
	(connected) => {this._changeConnectionStatus(connected); }
);

it seems to work

@brentvatne I also getting this NetInfo.isConnected.fetch(...).done is not a function using "react-native": 0.12.0

source: gharchive/issue

authors: brentvatne mschipperheyn pyadav

repo: facebook/react-native

license: MIT

license_type: permissive

license_source: github-api


text:
react-native link error "Failed to get dependency config" (RN 0.59.8)

React Native version:
info
  React Native Environment Info:
    System:
      OS: macOS 10.14.5
      CPU: (8) x64 Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
      Memory: 9.86 GB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.11.3 - /usr/local/bin/node
      npm: 6.9.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 23, 25
        Build Tools: 25.0.1, 25.0.2
        System Images: a...pis | Google APIs ARM EABI v7a Syste..., a...google_apis | Google APIs Intel x86 Atom Sys...
    IDEs:
      Android Studio: 2.3 AI-162.3764568
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3
      react-native: 0.59.8 => 0.59.8
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7
      react-native-rename: 2.2.2

Steps To Reproduce
Pretty sure this is an issue with react-native link, as I have tried a few different packages, still resulting in the same error.
npm install @aws-amplify/pushnotification --save
then
react-native link @aws-amplify/pushnotification
results in error:
debug Available platforms: iOS, Android
debug Targeted platforms: iOS, Android
debug Getting project config for iOS...
debug Getting project config for Android...
debug Package to link: @aws-amplify/pushnotificaton
error Failed to get dependency config
debug Error: Failed to get dependency config
    at getDependencyConfig (/Users/goneale/Projects/rag-apps/WowApps/WowManager/node_modules/@react-native-community/cli/build/commands/link/getDependencyConfig.js:49:11)
    at Object.link [as func] (/Users/goneale/Projects/rag-apps/WowApps/WowManager/node_modules/@react-native-community/cli/build/commands/link/link.js:97:61)

Can't get any linking to function.

Closing issue. Spelling mistake while running command!

I run this command:
react-native link realm --verbose
and get this issue:
error Failed to get dependency config
debug Error: Failed to get dependency config
    at getDependencyConfig (/Users/ankushrishi/Documents/echoheart-mobile/node_modules/@react-native-community/cli/build/commands/link/getDependencyConfig.js:49:11)
    at Object.link [as func] (/Users/ankushrishi/Documents/echoheart-mobile/node_modules/@react-native-community/cli/build/commands/link/link.js:97:61)
    at /Users/ankushrishi/Documents/echoheart-mobile/node_modules/@react-native-community/cli/build/cliEntry.js:152:22


text:
/bin/bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory

Description:
As suggested by the docs, I uninstalled global react-native-cli, and use npx instead.
I encounter this error when running :
npx react-native init AwesomeProject
as the error suggests, I run
cd ./AwesomeProject/ios && pod install
But still get the same error during installation of glog as follow:

/bin/bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory

React Native version:
Run `react-native info` in your terminal and copy the results here.

bash: react-native: command not found

Steps To Reproduce

brew install node
brew install watchman
sudo gem install cocoapods -n /usr/local/bin
npx react-native init AwesomeProject

Expected Results
An error during Installing glog (0.3.5).

Installing glog (0.3.5)
[!] /bin/bash -c
set -e
#!/bin/bash
Copyright (c) Facebook, Inc. and its affiliates.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
set -e
PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}"
CURRENT_ARCH="${CURRENT_ARCH}"
if [ -z "$CURRENT_ARCH" ] || [ "$CURRENT_ARCH" == "undefined_arch" ]; then
# Xcode 10 beta sets CURRENT_ARCH to "undefined_arch", this leads to incorrect linker arg.
# it's better to rely on platform name as fallback because architecture differs between simulator and device
if [[ "$PLATFORM_NAME" == *"simulator"* ]]; then
    CURRENT_ARCH="x86_64"
else
    CURRENT_ARCH="armv7"
fi

fi
export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)"
export CXX="$CC"
Remove automake symlink if it exists
if [ -h "test-driver" ]; then
rm test-driver
fi
./configure --host arm-apple-darwin
Fix build for tvOS
cat << EOF >> src/config.h
/* Add in so we have Apple Target Conditionals */
#ifdef APPLE
#include <TargetConditionals.h>
#include <Availability.h>
#endif
/* Special configuration for AppleTVOS */
#if TARGET_OS_TV
#undef HAVE_SYSCALL_H
#undef HAVE_SYS_SYSCALL_H
#undef OS_MACOSX
#endif
/* Special configuration for ucontext */
#undef HAVE_UCONTEXT_H
#undef PC_FROM_UCONTEXT
#if defined(x86_64)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
#elif defined(i386)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip
#endif
EOF
Prepare exported header include
EXPORTED_INCLUDE_DIR="exported/glog"
mkdir -p exported/glog
cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/"
/bin/bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory

Same issue, I have been trying to fix this since yesterday with various ways to convert the character, used dos2unix, vim fileformat=unix and a lot, nothing works. Am using MacOS with pod install (already remove entire Pods directory),  so no possibility of getting the file accidentally opened or edited on windows.

@ASaputra2019  open the file  node_modules/react-native/scripts/ios-configure-glog.sh in Sublime Text editor, change the line endings with View > Line Endings > Mac OS 9, save and try pod install, it works. Note: It doesn't works when you change to Unix line endings so must to Mac OS 9 in sublime text or some equivalent mac line ending from other tools.

@JohnpeterDairianadan  Thank you so much, it solved my problem that has been on my mind since yesterday too. Similar to you, I tried with dos2unix, also with vi and vim, but to no avail.. Crashed my environment trying to change anything in the process...  But finally with Sublime Text it works! Thank you!!

good to hear, but I would prefer to keep the issue open, as we remove node_modules sometime and wont exist in switching environment, so it is still an open issue, I just tried a workaround.

actually View > Line Endings > Mac OS 9, save and try pod install, it works. but after that run react-native run-ios command return
config.h dosn't found in mutex.h. this issue opened on 2018
https://github.com/facebook/react-native/issues/19774
I don't understand, now no one ios dev. dosn't use react-native on ios
My setup new, maybe it was my fauld

@OkancanCosar I got this issue solved yesterday with manually installed the third party libs glog, folly etc with the scripts under react-native node_module dir, and building the glog with cmake configure and make, then copied that to pod's glog dir, then it works. https://github.com/facebook/react-native/issues/22703#issuecomment-450486198.

sorry for my dummy :(
react-native init myproj
err => /bin/bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory
node_modules/react-native/scripts/ios-configure-glog.sh  =>  View > Line Endings > Mac OS 9, save and run pod install
i expect there is folder named node_modules/react-native/third_party but not.
react-native run-ios
err => myproj/ios/Pods/glog/src/base/mutex.h:105:10: fatal error: 'config.h' file not found
then
node_modules/react-native/scripts/ios-install-third-party.sh change
SCRIPTDIR=$(pwd)/$(dirname "$0")
fetch_and_unpack glog-0.3.5.tar.gz https://github.com/google/glog/archive/v0.3.5.tar.gz 61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc "sh "$SCRIPTDIR/ios-configure-glog.sh""
cd node_modules/react-native/ && scripts/ios-install-third-party.sh
and now created node_modules/react-native/third_party folder.
and then run-ios
still myproj/ios/Pods/glog/src/base/mutex.h:105:10: fatal error: 'config.h' file not found

after the third_party folder gets created and the glog, folly etc are fetched, go inside the glog directory (or may be to sub dir in the glog where configure file exist), then ./configure, then ./make, those missing config.h and other files will get created now, then copy all the files created under src, replace with pods glog dir then similary do for folly, but for folly you dont need to ./configure or ./make. just replace the files in pod folly. then run-ios it should build

I got the same problem, but I found #22703(comment) solved my issue instead of going to run the ios-configure-glog.sh or copy folders around. Hope this helpful.

used these instructions a couple of days ago after reading a few dozen comments across several threads
for convenience, most lines can be triple clicked to copy/paste
assumed you are comfortable editing in vi, if not, you'll need to adjust as necessary
on ios

starting from RN project root
vi node_modules/react-native/scripts/ios-configure-glog.sh

:w ++ff=mac

saves in mac line endings

vi node_modules/react-native/scripts/ios-install-third-party.sh

replace SCRIPTDIR=$(dirname "$0") with

SCRIPTDIR=$(pwd)/$(dirname "$0")

replace fetch_and_unpack glog-0.3.5.tar.gz https://github.com/google/glog/archive/v0.3.5.tar.gz 61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc "\"$SCRIPTDIR/ios-configure-glog.sh\""  with

fetch_and_unpack glog-0.3.5.tar.gz https://github.com/google/glog/archive/v0.3.5.tar.gz 61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc "sh \"$SCRIPTDIR/ios-configure-glog.sh\""

:wq

cd node_modules/react-native/scripts/ && ./ios-install-third-party.sh
cd third-party/ && cd glog-0.3.5/src && ./configure && ./make && cd ../..
cp -a glog-0.3.5/src/. ../../../../ios/Pods/glog/src/ && cp -a folly-2018.10.22.00/folly/. ../../../../ios/Pods/Folly/folly
cd ../../../../ios && pod update

@EmperorEarth , Sorry, I have question for the 5th step,

cd third-party/ && cd glog-0.3.5/src && ./configure && ./make && cd ../..
Do you mean to run ./configure on glog-0.3.5 directory?

Because after  cd third-party/ && cd glog-0.3.5/src, i ended up in src directory & can't run ./configure, but after cd .. , going up to glog-0.3.5 directory, I can run ./configure
how about ./make ? which directory should i run this from?
Thanks a lot

after the third_party folder gets created and the glog, folly etc are fetched, go inside the glog directory (or may be to sub dir in the glog where configure file exist), then ./configure, then ./make, those missing config.h and other files will get created now, then copy all the files created under src, replace with pods glog dir then similary do for folly, but for folly you dont need to ./configure or ./make. just replace the files in pod folly. then run-ios it should build

used these instructions a couple of days ago after reading a few dozen comments across several threads
for convenience, most lines can be triple clicked to copy/paste
assumed you are comfortable editing in vi, if not, you'll need to adjust as necessary
on ios

starting from RN project root

vi node_modules/react-native/scripts/ios-configure-glog.sh

:w ++ff=mac

saves in mac line endings

vi node_modules/react-native/scripts/ios-install-third-party.sh

replace SCRIPTDIR=$(dirname "$0") with

SCRIPTDIR=$(pwd)/$(dirname "$0")

replace fetch_and_unpack glog-0.3.5.tar.gz https://github.com/google/glog/archive/v0.3.5.tar.gz 61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc "\"$SCRIPTDIR/ios-configure-glog.sh\""  with

fetch_and_unpack glog-0.3.5.tar.gz https://github.com/google/glog/archive/v0.3.5.tar.gz 61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc "sh \"$SCRIPTDIR/ios-configure-glog.sh\""

:wq

cd node_modules/react-native/scripts/ && ./ios-install-third-party.sh

cd third-party/ && cd glog-0.3.5/src && ./configure && ./make && cd ../..

cp -a glog-0.3.5/src/. ../../../../ios/Pods/glog/src/ && cp -a folly-2018.10.22.00/folly/. ../../../../ios/Pods/Folly/folly

cd ../../../../ios && pod update

Thankyou, @EmperorEarth & everyone for your help!
I figured out what you meant after list files with ls command.
So just to make it clear for other people looking for this solution, on the 5th step, I ran ./configure  from glog-0.3.5 directory. But run make from glog-0.3.5/src directory.
I ran into "permission denied" problem with copying all files from glog-0.3.5/src to AwesomeProject/ios/Pods/glog/src and also from  folly-2018.10.22.00/folly to AwesomeProject/ios/Pods/Folly/folly - but this is because of my comp permission setup. So I did it manually with finder.
One more thing, after the first step: changing line-ending of ios-configure-glog.sh file - either with Sublime or with :w ++ff=mac - don't forget to run **pod install** from  /AwesomeProject/ios, otherwise AwesomeProject/ios/Pods/glog will be empty, and we can't proceed with copying files on step 6.

I started experiencing the above issue a few weeks ago, wanted to post on here as I narrowed it down to a git config change I made on OSX.
Prior to this change I hadn’t experienced a blog pod install issue, and reverting to earlier commits which had built fine exhibited the same issue.
In global git I had changed autocrlf to true. Removing this config line entirely meant RN 0.61.5 and glog 0.3.4 built and installed without an issue again.
Hope this helps someone else!

I started experiencing the above issue a few weeks ago, wanted to post on here as I narrowed it down to a git config change I made on OSX.
Prior to this change I hadn’t experienced a blog pod install issue, and reverting to earlier commits which had built fine exhibited the same issue.
In global git I had changed autocrlf to true. Removing this config line entirely meant RN 0.61.5 and glog 0.3.4 built and installed without an issue again.
Hope this helps someone else!

This worked for me too. Thank you!

Thanks @elpardos. Updated my comment because your solution is better
@ASaputra2019 and @JohnpeterDairianadan, you should check elpardos' comment and the update to mine

Thanks @elpardos. Updated my comment because your solution is better
@ASaputra2019 and @JohnpeterDairianadan, you should check elpardos' comment and the update to mine

Thank you EmperorEarth,
I did what you & elpardos suggested; indeed it successfully installed Cocoapods, but after changing the git config with
git config --global --add core.autocrlf input
Then when I want to run with init command : npx react-native init AwesomeProject
I hit another error from iPhone simulator:

Metro (the local dev server) is run from the wrong folder.
Check if Metro is running, stop it and restart it in the current project.
A module failed to load due to an error and AppRegistry.registerComponent wasn't called.
runApplication
AppRegistry.js:189:6

Do you know what the problem is? I tried to google it, and saw this issue 5220 but didn't really help me, I ran to another error after changing .h and .m files... Lol..
As for your prev solution, it worked just fine.

git config --global core.autocrlf false
solve for mac

On MacOS, I fixed like below. I tried other solutions, and none worked because Flipper-Glog 0.3.6 kept on overwriting with its own podspec configuration
Run pod install and encounter error regarding Flipper-Glog ./configure^M bad interpreter
pod install
Install dos2unix to help convert file from dos format to unix format
brew install dos2unix
Go to cocoapods repos directory
cd $HOME/.cocoapods/repos/
Locate Flipper-Glog with find command
find . -name "Flipper-Glog"
You should see result like below or alike
./master/Specs/2/7/2/Flipper-Glog
./trunk/Specs/2/7/2/Flipper-Glog
Now modify podspec of those two repo for version of Flipper-Glog you can see in Podfile. For me, it was 0.3.6
nano ./master/Specs/2/7/2/Flipper-Glog/0.3.6/Flipper-Glog.podspec.json
Find "./configure --host arm-apple-darwin" and put the following right before it
dos2unix -f * \n
Save and do the same thing for repo "trunk" in search result above then you are good to run "pod install" again
Cheers :))

I did nothing to set this to a DOS format. I've followed React Native Docs very closely. Why should I have to do this?

Hi @Seanmclem, I think my issue differed from yours. It was an issue with 'configure' command which could not execute on Mac OS. Perhaps, it was built and packaged on a windows PC. While yours was because of missing xcode command line tool configuration. I am glad you found a fix for your issue.

Hi @Seanmclem, I think my issue differed from yours. It was an issue with 'configure' command which could not execute on Mac OS. Perhaps, it was built and packaged on a windows PC. While yours was because of missing xcode command line tool configuration. I am glad you found a fix for your issue.

My problem was related to GitHub
Enviado desde mi iPhone
El ene. 19, 2021, a la(s) 3:57 a. m., Phan Phuoc Long notifications@github.com escribió:

Hi @Seanmclemhttps://github.com/Seanmclem, I think my issue differed from yours. It was an issue with 'configure' command which could not execute on Mac OS. Perhaps, it was built and packaged on a windows PC. While yours was because of missing xcode command line tool configuration. I am glad you found a fix for your issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/facebook/react-native/issues/28217#issuecomment-762698947, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AICYYERU6XCUVD6MAYUTT53S2VCPRANCNFSM4LAC2LMA.

My problem was related to GitHub
Enviado desde mi iPhone
El ene. 19, 2021, a la(s) 3:57 a. m., Phan Phuoc Long notifications@github.com escribió:

Hi @Seanmclemhttps://github.com/Seanmclem, I think my issue differed from yours. It was an issue with 'configure' command which could not execute on Mac OS. Perhaps, it was built and packaged on a windows PC. While yours was because of missing xcode command line tool configuration. I am glad you found a fix for your issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/facebook/react-native/issues/28217#issuecomment-762698947, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AICYYERU6XCUVD6MAYUTT53S2VCPRANCNFSM4LAC2LMA.

I wonder how come that this stuff still isn't fixed by now.
Is that normal to have files with DOS line endings in the repo that's most likely used on MANY macOS and Linux devices?

I have no idea. I no longer encounter line ending issue again when
initializing new react native projects. Please check and make sure you have
latest react native version and Flipper glog
On Sunday, March 7, 2021, Michał Kostrzyński notifications@github.com
wrote:

I wonder how come that this stuff still isn't fixed by now.
Is that normal to have files with DOS line endings in the repo that's most
likely used on MANY macOS and Linux devices?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/issues/28217#issuecomment-792113751,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AL4P3GWTGLD5JPQGZPTQDFTTCK2C5ANCNFSM4LAC2LMA
.

git config --global --add core.autocrlf input

This works for me!

hat tip to elpardo farther down in this thread

check your git's global autocrlf setting

git config --global core.autocrlf
repository one doesn't matter for this issue (my repo setting was right but my global one was wrong)

if it isn't already, set it to input on macOS (false also works, see documentation link below)

git config --global --add core.autocrlf input

git's core.autocrlf documentation
Hacky workaround spoilered to avoid misleading

This works for me!

authors: ASaputra2019 DeviousM EmperorEarth JohnpeterDairianadan OkancanCosar Seanmclem alexyoubaifu dragons3232 elpardos mervin-adaptels mervintankw ramses429 secosan


text:
Failed to construct transformer:  Error: Cannot create a string longer than 0x1fffffe8 characters

Description
When I use 'react-native run-android --variant=release' command to build project I get the following error.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8/userguide/command_line_interface.html#sec:command_line_warnings
117 actionable tasks: 2 executed, 115 up-to-date
Failed to construct transformer:  Error: Cannot create a string longer than 0x1fffffe8 characters
at Object.slice (buffer.js:608:37)
at Buffer.toString (buffer.js:805:14)
at Object.readFileSync (fs.js:421:41)
at getContent (/Users/sachin/Desktop/mobile-app/album/node_modules/jest-haste-map/build/worker.js:149:41)
at Object. (/Users/sachin/Desktop/mobile-app/album/node_modules/jest-haste-map/build/worker.js:178:25)
at Generator.next ()
at asyncGeneratorStep (/Users/sachin/Desktop/mobile-app/album/node_modules/jest-haste-map/build/worker.js:78:24)
at _next (/Users/sachin/Desktop/mobile-app/album/node_modules/jest-haste-map/build/worker.js:98:9)
at /Users/sachin/Desktop/mobile-app/album/node_modules/jest-haste-map/build/worker.js:103:7
at new Promise () {
type: 'Error',
code: 'ERR_STRING_TOO_LONG'
}
Error: @build-script-error-begin
Error loading assets JSON from Metro. Ensure you've followed all expo-updates installation steps correctly. Cannot create a string longer than 0x1fffffe8 characters
@build-script-error-end
at /Users/sachin/Desktop/mobile-app/album/node_modules/expo-updates/scripts/createManifest.js:39:11
at processTicksAndRejections (internal/process/task_queues.js:93:5)

But if I use 'react-native --variant=debug' then I do not see any build issue.
React Native version:
sachins-MacBook-Pro:album sachin$ react-native info
info Fetching system and libraries information...
(node:4602) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
System:
OS: macOS 11.2.3
CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
Memory: 438.84 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.15.4 - /usr/local/bin/node
Yarn: Not Found
npm: 7.10.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 29, 30
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.3
System Images: android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play ARM 64 v8a, android-30 | Google Play Intel x86 Atom, android-30 | Google Play Intel x86 Atom_64
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7042882
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_292 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: ~0.63.4 => 0.63.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps To Reproduce
It is happening on my local machine all the times. I am not sure how to reproduce it on snack. I can provide the needed info.
Expected Results
release build should be built.

After checking the size of the whole directory I found an unrelated file of size 600 MB. By mistake I copied that file to the react-native project. After deletion build started to work fine.


text:
Increased Virtualized List Blanking in Fabric

Description
I been working to migrate my app from Paper to Fabric. One of the roadblocks appears to be that we see additional list blanking when using virtualized lists. The two virtualized lists that I've been testing is FlashList and a homegrown one.
For the rest of this issue, I'll focus my explanation based on FlashList on Android. FlashList because it's the more popular library, and Android because I have not yet tested any other platform.
From my debugging, I believe that (part of) the increase in blanking can be attributed to setState calls getting batched into a single render. This seems to delay the render, which delays new list items appearing on the screen, which increases blanking. This batching does not appear on Paper, but it's probably more because of concurrent mode than the implementation of Fabric in itself.
For example, in the following video, you can see that the blanking roughly correlates with when the setState calls are getting batched:
https://github.com/facebook/react-native/assets/5456182/e10e58d0-b49c-498a-9cdc-f585b39455f4
If I hack React internals to force setStates to always use SyncLane then this problem doesn't occur (as badly). I'm wondering if there's some sanctioned API I can use to kinda... setState like that. Perhaps some version of flushSync in react-dom?
(Even after the above hack I still observe worse list blanking on Fabric, but I haven't been able to further isolate things yet. I dunno if you folks have any ideas. :P)
React Native Version
0.72.7
Output of npx react-native info
info Fetching system and libraries information...
System:
  OS: macOS 13.6.1
  CPU: (10) arm64 Apple M1 Max
  Memory: 19.88 GB / 64.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.6.1
    path: ~/.nix-profile/bin/node
  Yarn:
    version: 1.22.19
    path: ~/.nix-profile/bin/yarn
  npm:
    version: 9.8.1
    path: ~/.nix-profile/bin/npm
  Watchman:
    version: 4.9.0
    path: /Users/jerry.jiang/.nix-profile/bin/watchman
Managers:
  CocoaPods:
    version: 1.11.0
    path: /Users/jerry.jiang/.nix-profile/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.2
      - iOS 16.2
      - macOS 13.1
      - tvOS 16.1
      - watchOS 9.1
  Android SDK:
    API Levels:
      - "30"
      - "31"
      - "32"
    Build Tools:
      - 30.0.3
    System Images:
      - android-31 | Google Play ARM 64 v8a
      - android-32 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10671973
  Xcode:
    version: 14.2/14C18
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.1
    path: /Users/jerry.jiang/.nix-profile/bin/javac
  Ruby:
    version: 2.6.10
    path: /Users/jerry.jiang/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.7
    wanted: 0.72.7
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: false

Steps to reproduce
The high level steps is basically:

Get a react-native project with a virtualized list. I've included my test project below.
Render a few hundred items in the list.
Scroll. To make it a little more scientific I've been using ADB commands like adb shell "input touchscreen swipe 200 800 200 200 100"

You should be able to observe that blanking is worse on Fabric than Paper.
Here are some videos of me trying it out. In these videos I'm using a Samsung Galaxy A11, I found that weaker phones allow us to more clearly see the problem. But even on a Pixel 6 Pro it is noticable.

Paper (Prod)
 Fabric (Prod)

Unfortunately I couldn't figure out how to make the SyncLane change in a prod build so here is a dev build comparison of the hack.

 Fabric (Dev, Base)
  Fabric (Dev, Hack)

Snack, code example, screenshot, or link to a repository
https://github.com/tpcstld/react-native-test/tree/fabric-scrolling
Note the branch name, it's not main.

FWIW, I'm not that familiar with React Native's internals, so this setState batching could be a red herring and I'm just getting bamboozled. This is just the path that I've been debugging so far.
Regardless the performance difference between Paper and Fabric for these virtualized lists is consistently reproable.

Thanks for the issue. We have an internal tracker for this kind of things and we plan to work on them soon: I ported the issue there.
Meanwhile, @sammy-SC or @javache do you have any thoughts on this issue/problem?

To add some more to this - Discord has been migrating to Fabric for a while, we're nearing the end of the long migration but we're seeing significant performance drops across the app. This is the primary issue we've been able to identify concisely and create a reproduction but overall it's concerning. If we're unable to resolve the performance issues, it will be a blocker for launching the Fabric version of our app - I assume this would be the same for other companies also.

Hello,
thanks for the detailed report.
The fact that forcing React to use a different lane mitigates the issue (mostly, I will get to this later) indicates there is a difference between what event is used to trigger adding a new item to the list.
For FlashList, what host platform event is used to add a new item?
When you are seeing a difference even with hacking React internals, are you running debug or production build?

Hey Sammy!
Btw FlashList uses recyclerlistview.
I believe that recyclerlistview is using the onScroll event to trigger adding the item. But it is a little convoluted. At the end of the day it's the updateOffset call which eventually leads to _renderStackWhenReady
I'm running on a debug build. Unfortunately I haven't yet figured out how to get my change to work when I'm using a production build haha.

To add to this, here's a sandbox app of 500 items in a FlatList. The Android build of this sandbox has been modified to build a specific commit of React Native from source, using a fork of React Native 72.7.
Below are the findings of using a scroll script to scroll the items. Left side is Paper, right side is Fabric. The videos start right after the script pushes the button to render the lists. This is with the JS dev bundle option turned off. From the videos, it looks like Fabric is taking longer to render the items, and therefore takes longer to scroll to the bottom of the list.

Paper
Fabric

https://github.com/facebook/react-native/assets/1063664/002ceff8-c482-4cb2-ae93-a70167fface0
https://github.com/facebook/react-native/assets/1063664/798d6ad2-ddbf-432d-8848-ffe433881a00

Thanks for the response. I have also been a little off, but I will get to this soon. End of week at latest.

Wait @cipolleschi, I just realized, we have ran those benchmarks in a release configuration. The videos labelled Paper (Prod) and Fabric (Prod) where generated when I built the app with npm run android --prod

Actually sorry again, I realized what you're looking for. After further reading I understand now that there is a difference between prod and release.
Here is the benchmark on an app built with npx react-native run-android --mode=release:

Paper (Release)
 Fabric (Release)

Scrolling down was automated using adb shell "input touchscreen swipe 200 800 200 200 25". I've used the same Samsung Galaxy A11 as before.

@tpcstld Thanks a lot for checking that.
Allow me to ask a few extra questions to narrow down the problem and to understand it better:

I understand correctly that the problem is that the area of the red portion, when scrolling, is much bigger in Fabric, and that's an issue for you?
There are no issues on how smooth is the animation, right?
Does this happen for iOS as well?
How did you create the sandbox app mentioned above?
Did you use the same sandbox app for the test above?

based on 4. and 5. we might be able to use the sandbox app to investigate this further.

Happy Holidays!

Yes that is correct. The red portion correlates to the amount of blanking.
I don't perceive any problems with frame rate, either on scrcpy or on the physical device itself.
iOS hardly blanks at all on either architecture, so I'm not particularly able to distinguish whether or not there is a problem, or if the better overall performance is just masking it.
That isn't the sandbox app that I used. I'm using https://github.com/tpcstld/react-native-test/tree/fabric-scrolling (in particular note the branch which isn't main). It's been a while, but I'm pretty sure I made this project via create-react-native-app.
I used https://github.com/tpcstld/react-native-test/tree/fabric-scrolling in all the videos sent so far.

Hello there! I'm trying to reproduce the issue, but it seems gone on 0.73.2.
Here are my steps:

Created a new app npx react-native@latest init TestFlatList --version latest
Open VS code.
Added the TS code below (thanks @tpcstld) for it.
Run the app yarn android. Note that I'm running in Debug, on purpose.
use this command to scroll: adb shell "input touchscreen swipe 200 800 200 200 25" (thanks again @tpcstld)
These are the results:

Old Arch
New Arch

I tried to play further with the repros, but I couldn't let them display the red background.
I think that we fix these perf problems in 0.73, when we landed and released faa85f84ce96986d4097a8df99e8fbc402c6b662.
/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 */

import React from 'react';
import {View, Text, StyleSheet, FlatList} from 'react-native';

const NUM_ITEMS = 300;
const HEIGHT = 40;
const DATA = Array.from({length: NUM_ITEMS}, (_, i) => i);

const isFabricEnabled = global?.nativeFabricUIManager != null;

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: 'red',
  },
  row: {
    height: HEIGHT,
    color: 'black',
    backgroundColor: isFabricEnabled ? 'lightblue' : 'lightgreen',
  },
});

function Item({item}: {item: number}) {
  return <Text style={styles.row}>{item}</Text>;
}

function renderItem({item}: {item: number}) {
  return <Item item={item} />;
}

export default function App(): JSX.Element {
  return (
    <View style={styles.container}>
      <FlatList data={DATA} renderItem={renderItem} />
    </View>
  );
}

I also tried with 72.10 and I can't repro the problem.
@tpcstld @Flewp could you try to update your tests to 72.10 (I'm not asking to update to 73... yet! 😝 ) and double check? I'm worried that I might not be doing the right tests... 🤔

I also tried with 72.10 and I can't repro the problem. @tpcstld @Flewp could you try to update your tests to 72.10 (I'm not asking to update to 73... yet! 😝 ) and double check? I'm worried that I might not be doing the right tests... 🤔

Thank you for testing this. Will update to 72.10 and report back!

Using the repro steps above, I'm also not reproducing this on 72.10 and 73.4 to the extent that we were seeing on previous versions. I also added some logs in RecyclerListView to make sure that the paper renderer was calling render for every setState, and that fabric was batching setState calls every now and then for each render call. So, it seems like concurrent renderer isn’t causing performance regressions in the sandbox app on these React Native versions. We'll work on upgrading our React Native version internally. Appreciate you all working with us on this. 🙏
In the videos below, I'm using a vivo Y15a. I used the scroll script to scroll down to the bottom of the list initially. Then scrolled with my finger to the top, bottom, and top again. Side by side:
72.10

Paper
Fabric

73.4

Paper
Fabric

Sooo.... can we close the issue then? 😄

Yeah, we're good to close the issue 😄

authors: Flewp cipolleschi sammy-SC thenickreynolds tpcstld


text:
codegen cli not accessible

Description
As per the docs, we're suggested to use npx react-native codegen ... to generate code and don' care bou' new arch. or old arch. but that's resulting into codegen not a command error. i installed @react-native/codegen as well, but that didn' work as well.
Steps to reproduce

create an example rn-turbo-module
try generating code with the command suggested in the docs
i.e. npx react-native codegen --path={your_module_path} --platform=all --outputPath={generated dir path}

expected error:
codegen: command not found
React Native Version
0.73.2
Affected Platforms
Runtime - Android, Runtime - iOS
Areas
TurboModule - The New Native Module System, Codegen
Output of npx react-native info
info Fetching system and libraries information...
System:
  OS: macOS 14.2.1
  CPU: (8) arm64 Apple M2
  Memory: 118.33 MB / 8.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 21.5.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 1.22.21
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.2.4
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2023.12.04.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK:
    API Levels:
      - "33"
      - "34"
    Build Tools:
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 34.0.0
    System Images:
      - android-33 | Google Play ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11076708
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.9
    path: /opt/homebrew/opt/openjdk@17/bin/javac
  Ruby:
    version: 3.1.2
    path: /Users/a_man/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

/* ran it inside my turboModule package repo */

Stacktrace or Logs
error: unknown command 'codegen'

Reproducer
https://github.com/imtheaman/rn-unique-identifier
Screenshots and Videos
No response

Hi @imtheaman, thanks for opening the issue, but it does not apply.
If you look at the website, the selector is set to next. This means that you are looking at the doc for the Next version of react-native: 0.74.
It is expected for that feature not to be available in 0.73.

@imtheaman You can use react-native 0.74.0-beta3 in package.json to use this now

You should not depend on react-native@0.74.0-beta3 directly in your package.json as you will most likely forget to update it once 0.74.0 is released

EDIT: For future travelers, I used: node node_modules/react-native/scripts/generate-codegen-artifacts.js -p . -o tm. The Android documentation seems to reference "tm_build" but I'm not sure if that's the intended or that should be changed to 'build'

what's tm_build?

EDIT: For future travelers, I used: node node_modules/react-native/scripts/generate-codegen-artifacts.js -p . -o tm. The Android documentation seems to reference "tm_build" but I'm not sure if that's the intended or that should be changed to 'build'

what's tm_build?

It was this line in the CMakeLists.txt file that confused me:

add_subdirectory(${REACT_ANDROID_DIR}/../../../tm/ tm_build)

It seems to be correct because Android and iOS both build properly out of the box for me!  iOS requires me to build using XCode for some reason but it works for now.

authors: cipolleschi cortinico imtheaman therealpurplemana


text:
After a component sets the backgroundColor property, its zIndex will be infinite?

Description
The backgroundColor of a component will cause the zIndex property of its sibling components to become invalid.
Devices: iPhone XR, Samsung A51
Steps to reproduce
I just created a new project.
import React, {useState} from 'react';
import {
  LayoutChangeEvent,
  StyleSheet,
  Text,
  TouchableOpacity,
  View,
} from 'react-native';

function Popover() {
  const [visible, setVisible] = useState(false);
  const [top, setTop] = useState(0);

  const onLayout = (e: LayoutChangeEvent) => {
    const {x, y, width, height} = e.nativeEvent.layout;
    setTop(height + 10);
  };

  return (
    <View style={{overflow: 'visible', alignItems: 'center'}}>
      <TouchableOpacity
        style={{height: 30, backgroundColor: 'orange'}}
        onLayout={onLayout}
        onPress={() => setVisible(!visible)}>
        <Text>Press here to open popover!</Text>
      </TouchableOpacity>

      {visible && (
        <View style={[{alignItems: 'center', zIndex: 999, position: 'absolute', top}]}>
          <View style={[styles.triangle]} />
          <View
            style={{
              backgroundColor: 'rgba(0,0,0,0.65)',
              padding: 10,
              borderRadius: 5,
            }}>
            <Text style={styles.popoverText}>
              This is the contents of the popover
            </Text>
          </View>
        </View>
      )}
    </View>
  );
}

function App(): React.JSX.Element {
  return (
    <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
      <Popover />
      <View style={{width: '100%', height: 50, justifyContent: 'flex-end', backgroundColor: 'pink'}}>
        <Text>Other element</Text>
      </View>
    </View>
  );
}

const styles = StyleSheet.create({
  triangle: {
    width: 0,
    height: 0,
    borderStyle: 'solid',
    borderTopWidth: 0,
    borderBottomWidth: 8,
    borderRightWidth: 8,
    borderLeftWidth: 8,
    borderRightColor: 'transparent',
    borderLeftColor: 'transparent',
    borderTopColor: 'transparent',
    borderBottomColor: 'rgba(0,0,0,0.65)',
    backgroundColor: 'transparent',
  },
  popoverText: {
    color: 'white',
    flexWrap: 'nowrap',
  },
});

export default App;

Just change
<View style={{width: '100%', height: 50, justifyContent: 'flex-end', backgroundColor: 'pink'}}>
<Text>Other element</Text>
</View>

to:
<View style={{width: '100%', height: 50, justifyContent: 'flex-end' }}>
<Text>Other element</Text>
</View>

React Native Version
0.74.2
Affected Platforms
Runtime - Android, Runtime - iOS
Output of npx react-native info
System:
  OS: macOS 14.4.1
  CPU: (8) arm64 Apple M1 Pro
  Memory: 77.98 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 21.6.2
    path: /opt/homebrew/bin/node
  Yarn:
    version: 3.6.4
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.2.4
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2024.01.22.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/fjliang/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11255304
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.9
    path: /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/javac
  Ruby:
    version: 2.7.6
    path: /Users/fjliang/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.2
    wanted: 0.74.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

### Stacktrace or Logs

```text
no log

Reproducer
The code is provided above.
Screenshots and Videos

Adding zIndex property to other components solved my problem.


text:
When calling the Image.getSize method, an error is reported.

Description
When calling the Image.getSize method, an error is reported. The error message is failed to get size for image  https://xxxx/xxx.png
Steps to reproduce
scaffolding tools
React Native Version
0.73.0
Affected Platforms
Build - MacOS
Output of npx react-native info
failed to get size for image  https://xxxx/xxx.png

Reproducer

Screenshots and Videos
No response

Please provide a valid repro

@cortinico I've starting getting this error on iOS with images being picked by the library on 0.74.3
Failed to getSize of file:///var/mobile/Containers/Data/Application/1CFA2DA2-6D24-44E1-A36C-BA4D579EE700/tmp/AA057E22-3A8E-4ABD-A01A-D15B44BB9FF3.jpg

this is the full stack trace:

It's hard to repro, I use react-native-image-crop-picker and it appears it's totally random.

authors: cortinico efstathiosntonas nianxiongdi


text:
xcode build failed nonzero exit code

Description
After install clean react-native and build in real device in xcode, i have error.
Steps to reproduce
install clean version 0.76.1

bundle install
bundle exec pod install
Open AwesomeProject.xcworkspace
Choose real device
Add my certificate developper team
run xcode real device

React Native Version
0.76.1
Affected Platforms
Runtime - iOS
Output of npx react-native info
(node:93928) ExperimentalWarning: CommonJS module /opt/homebrew/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /opt/homebrew/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
info Fetching system and libraries information...
(node:93944) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
System:
  OS: macOS 15.1
  CPU: (10) arm64 Apple M2 Pro
  Memory: 207.88 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 23.1.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 3.6.4
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.9.0
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2024.11.04.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/user/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.1
      - iOS 18.1
      - macOS 15.1
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK:
    API Levels:
      - "28"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
      - "33"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 29.0.2
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 32.0.0
      - 33.0.0
      - 33.0.1
      - 34.0.0
      - 35.0.0
    System Images:
      - android-16 | Intel x86 Atom
      - android-16 | Google APIs ARM EABI v7a
      - android-16 | Google APIs Intel x86 Atom
      - android-29 | Google Play ARM 64 v8a
      - android-31 | Google TV Intel x86 Atom
      - android-31 | Google APIs ARM 64 v8a
      - android-33 | Google APIs ARM 64 v8a
      - android-33 | Google APIs Intel x86_64 Atom
      - android-34 | Intel x86_64 Atom
      - android-34 | Google APIs Intel x86_64 Atom
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10227.8.2321.11479570
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /usr/bin/javac
  Ruby:
    version: 2.7.6
    path: /Users/user/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs
Command PhaseScriptExecution failed with a nonzero exit code

Reproducer
no repo
Screenshots and Videos
No response

Please search for other similar issues in the issue tracker first:
https://github.com/facebook/react-native/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen+"Command+PhaseScriptExecution+failed+with+a+nonzero+exit+code"
Also you're providing little to no information to us to debug this, so we can't help you in any form.

what information do you want, tell me. i just create new application, no plugin added, and i try build in real device is not work, im on macos sequoia, and latest version of react-native and xcode.
I looked elsewhere but none worked for me.
Sorry.

i resolve this temporarily, But it's not normally,
Change in file .xcode.env, export NODE_BINARY=/opt/homebrew/Cellar/node/23.1.0_1/bin/node
In terminal
bundle exec pod deintegrate
Cd .. rm -R node_modules
Yarn install
Cd iOS && bundle exec pod install
Clean build project Xcode

any one can help me ? i tested 0.76.2 and error its here

authors: cortinico gh-pro


text:
Issue @ getting started, attached npm-debug.log

React Native Version: react-native-cli: 1.0.0
react-native: n/a - not inside a React Native project directory
OS: Mac OS X El Captain
npm-debug.txt

What are you trying to do ? Can you provide more information ?

After longtime, wanted to try creating an React Native application. So went to "Getting started" and followed the instruction. Installed Homebrew, flow, watchman & ReactNative-cli.
executed "react-native init PlaybookPreMobile" in command line and i got below error in log.
log:

This will walk you through creating a new React Native project in /Users/yogeshofit/Desktop/React/NativeWorkspace/PlaybookPreMobile
Installing react-native package from npm...
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "--save-exact" "react-native"
npm ERR! node v6.2.2
npm ERR! npm  v3.9.5
npm ERR! Invalid Version: 0.0.1alpha1
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR!     /Users/yogeshofit/Desktop/React/NativeWorkspace/PlaybookPreMobile/npm-debug.log
npm install --save --save-exact react-native failed

Regards,
Yogesh Surendran alias CarreraPHP

Any update for the issue?

Everything works fine on my side on OS X and node v6.2.2.
Can you try again?

Hi there! This issue is being closed because it has been inactive for a while.
But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/issue-getting-started-attached-npm-debuglog
Product Pains has been very useful in highlighting the top bugs and feature requests:
https://productpains.com/product/react-native?tab=top
Also, if this issue is a bug, please consider sending a pull request with a fix.

authors: CarreraPHP charpeni mkonicek


text:
Deploy showcase, support when building gh-pages on master.

Addresses #9865.
We want the showcase and support pages to be loaded from root regardless of which React Native version is selected.

By analyzing the blame information on this pull request, we identified @bestander and @Andreyco to be potential reviewers.

@hramos updated the pull request - view changes

nice work!
Let's give it a try

@facebook-github-bot shipit

source: gharchive/pull-request


text:
[CLI] Copy assets other then fonts

This PR allows assets other then font files to be copied & linked into project using react-native link command.
For now react-native link only allows certain asset files (font file for android, font + image for ios) to be copied/linked, but it's sometimes useful for an external RN library to do so. For example, a 3D library may want to load several .stl/.obj modeling file, or a sound effect library may want to load some audio samples.
As a RN library developer, currently we can only write manual installation step in README to guide our users, however it's tedious and often confuse people if they have no native developing experience.
Test Plan
Precondition: we are in the root of some RN project

create a fake library in node_modules (in here we call it rn-test-asset), with following structure:

(we can put arbitrary content in test.txt, it doesn't matter)

the package.json for this fake library should contains an assets config, like this:

run react-native link rn-test-asset

verify whether the asset files (for now, it should be test.txt) has been linked:

for iOS, we should check Resources and Copy Bundle Resources:

for android, we should check android/app/src/main/assets/:

run react-native unlink rn-test-asset

verify the asset is properly unlinked

Related PRs
None
Release Notes
[CLI][ENHANCEMENT][local-cli/link/{ios,android}/{copyAssets,unlinkAssets}.js] - Allow react-native link to link asset other then font files

Warnings

:warning:

:lock: package.json - Changes were made to package.json. This will require a manual import by a Facebook employee.

:warning:

:exclamation: Big PR - This PR is extremely unlikely to get reviewed because it touches 90684 lines.

  Generated by :no_entry_sign: dangerJS

Close due to accidentally corrupt this PR, will try another later.


text:
Add Needs: Repro bot action

Summary

Add automated response for Needs: Repro
Changelog

[Internal] [Added] - Add automated response for Needs: Repro
Test Plan
Bot should add a comment with the Needs: Repro label.

Tweaked the message slightly (match capitalization in header, and link to mcve in Stack Overflow). Example:
:warning:
Missing Reproducible Example
:information_source:It looks like your issue is missing a reproducible example. Please provide a Snack or a repository that demonstrates the issue you are reporting in a minimal, complete, and reproducible manner.

authors: hramos safaiyeh


text:
evenly distribute adjustment between top and bottom

Summary: Before we were dividing proportionally and were noticing some truncation at the bottom. It seems that the truncation was disproportionately because of the way the metrics are calculated. Through guess and check, dividing equally between top and bottom seems to yield better results... 🤡
Reviewed By: NickGerleman, xunrongl
Differential Revision: D62665295

merged


text:
Expose Systrace from the 'react-native' package

This allows React Native apps to instrument their own code via Systrace.measureMethod() and the like.
Test Plan: Used require('react-native').Systrace in my own app successfully to instrument my own code.

By analyzing the blame information on this pull request, we identified @sebmarkbage and @gabelevi to be potential reviewers.

@facebook-github-bot shipit

Thanks for importing. If you are an FB employee go to Phabricator to review.


text:
fix compile warning

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
(You can skip this if you're fixing a typo or adding an app to the Showcase.)
Explain the motivation for making this change. What existing problem does the pull request solve?
Prefer small pull requests. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
Test plan (required)
Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.
Make sure tests pass on both Travis and Circle CI.
Code formatting
Look around. Match the style of the rest of the codebase. See also the simple style guide.
For more info, see the "Pull Requests" section of our "Contributing" guidelines.

By analyzing the blame information on this pull request, we identified @mkonicek and @olegbl to be potential reviewers.

It's been a while since the last commit was reviewed and the labels show this pull request needs review. Based on the blame information for the files in this pull request we identified @mkonicek as a potential reviewer. Could you take a look please or cc someone with more context?

It looks like your PR description is missing some necessary information. Can you please add all the details specified in the template? This is necessary for people to be able to understand the proposed change.


text:
[Rebuild] Integrate with error formatter

Integrate @chenglou's error formatter into rebuild.

Done in bsb at least!

authors: chenglou yunxing

repo: facebook/reason


text:
Fix xmlns import for android yoga library

Fix xmlns import for yoga library by using apk instead of lib in the comment.

Actually shouldn't it be apk/lib?
cc @rspencer01

could be too, I'm not that familiar with android, but at least this was the thing I had to change to make a working/compilable example project.

I am not certain, but a google search suggests apk/res.  Give that a go?  I'd be more happy with that than apk.

How about http://schemas.android.com/apk/res-auto ? Which is the suggestion Android Studio makes.

I object to that because it pulls in everything.  We had trouble back when we had attributes like
yoga:height

that conflicted with some other library's definition of height.  We don't want to do this to other people (as unlikely as it may be).  What was it breaking, out of interest?

It didn't compile 😅
I created a complete new project with a different namespace, added the gradle imports, copied the example xml layout. And this was the necessary change which costed me some hours 😂

Ok.  Well, this is a minor change, its really not worth anybody losing sleep about.

repo: facebook/yoga

license: mit

license_source: bigquery


text:
Restore path after arrow dependency install

After the arrow dependency was installed the path is not returned to where it
originally was.
As a result sourcing the script results in subsequent processing to be within the arrow directory rather than the original base directory.

@majetideepak FYI

repo: facebookincubator/velox


text:
Fix scheduled fuzzer run build

Summary: Fix broken builds like https://github.com/facebookincubator/velox/actions/runs/7176368417/job/19541152056
Differential Revision: D52092000

Close duplicate:  https://github.com/facebookincubator/velox/pull/7977


text:
Potential source of GPU memory leak in ESMFold

Hello.
I have recently been testing ESMFold's Attention module for separate use cases, and I believe I discovered a (potential) source of GPU memory leaks. In my testing, while monitoring the ratio of current GPU memory allocated to max GPU memory historically allocated via print(f"GPU memory ratio: {torch.cuda.memory_allocated() / torch.cuda.max_memory_allocated()}"), I notice that unless I change q = self.rescale_factor * q to q *= self.rescale_factor I experience an out-of-memory error in PyTorch during the backward pass after approximately 500 training steps (in my particular use case). Would anyone happen to have some insights as to why this might occur in specific use cases, or is it possible that this phenomenon affects ESMFold generally speaking?
https://github.com/facebookresearch/esm/blob/c9c7d4f0fec964ce10c3e11dccec6c16edaa5144/esm/esmfold/v1/misc.py#L188

False alarm. I discovered that my out-of-memory issue was (most likely) being caused by an external issue, so I believe this issue is no longer relevant (or valid).

repo: facebookresearch/esm


text:
[Question] AssertionError using extract.py

Hello, I was trying to use
python extract.py esm1b_t33_650M_UR50S ../test/test.fasta my_reprs/ --repr_layers 0 32 33 --include mean per_tok

And it returns:
Traceback (most recent call last):
  File "extract.py", line 134, in <module>
    main(args)
  File "extract.py", line 66, in main
    dataset = FastaBatchedDataset.from_file(args.fasta_file)
  File "/home/jsun/msa_transformer/esm/esm/data.py", line 52, in from_file
    assert len(set(sequence_labels)) == len(sequence_labels)
AssertionError

I guess that there are problems with my fasta file (about 350 sequences and 450 amino acids for each). Are there any restrictions on fasta file? Can anyone please help me with this problem?

I found duplicated accessions in my fasta file and caused this error.


text:
Relation between build/viewer and the observations output from sim.step()

So I've been running simulations based off of the Jupyter notebook example habitat-sim-demo.ipynb. I'm essentially compiling the separate RGB frames that you get from observations['color_sensor']  each time step and constructing a video. It's a little unclear how I could run simulations using build/viewer instead since the viewer renders at a higher resolution and leads to better videos.

Hi @anoopsonar30,
To change resolution of your video you can use simulator sensor settings inside Jupyter notebook. You can rebuild the simulator with head attached and run same code from Jupyter notebook in command line and watch rendered navigation trajectory.

Increasing the resolution of the sensor (or adding a second, higher resolution, color sensor) is the way to go.  We don't support replaying navigation trajectories in the view currently.
To clarify, you do not need to build in headed mode to increase the resolution of images inside the jupyter notebook.

Thank you for your reply.
@erikwijmans I did notice the option to adjust the resolution. When I meant better videos, I was referring to being able to replay navigation trajectories in the build/viewer since they look much cleaner than the RGB videos without all the stitching artifacts. It's unfortunate that the feature is not yet supported. I'm curious, what's the potential use case for the build/viewer right now? I really like it because of the low latency however I'm not sure how to use it productively in running simulations.
@mathfac what did you mean by "watch rendered navigation trajectory" ?

I also noticed that I can now test physics inside

Also physics works in headless mode.  We are still very much building out how to control it in headless mode tho, so if you have a use case, we are happy to work with you on getting that to work smoothly.
What do you mean by "When I meant better videos, I was referring to being able to replay navigation trajectories in the build/viewer since they look much cleaner than the RGB videos without all the stitching artifacts." Habitat-api has a function take a list of images and make a video (images_to_video)  and those end up looking great IMO (https://www.youtube.com/watch?v=wNDcvomBRt8)

Ah that would be wonderful. I'm trying to simulate a quadrotor. Although the lower level dynamics can all be abstracted out, the agent just needs to be able to fly over obstacles. I remember this wasn't possible a few months ago because the robot had to be in contact with the floor due to some sort of navmesh requirement and couldn't detect collisions accurately if I forced a "move_up" command. In simulation this would just be like a small sphere that I can control with higher level commands (like move forward, turn left, turn right, etc) that can fly over say a table or bed in the environment.
My statement was just biased due to the one specific environment skokloster-castle that looks considerably prettier than others haha. My bad.

If you look at the image above you'll notice the slight gap in the mesh. This would be fine if it was solely a rendering issue however when the agent travels over that, it gets detected as a collision although there really is no collision. I'm trying to simulate robots on long time horizons and this has been a bit of a problem. And it's not an isolated incident and can be found in multiple environments (This one in particular is Portal.glb)
Also I noticed that in the youtube video the robot seems to be travelling quite a long distance quite smoothly. Would you be willing to open source that code or send it to me? That would be very helpful.

Ah that would be wonderful. I'm trying to simulate a quadrotor. Although the lower level dynamics can all be abstracted out, the agent just needs to be able to fly over obstacles. I remember this wasn't possible a few months ago because the robot had to be in contact with the floor due to some sort of navmesh requirement and couldn't detect collisions accurately if I forced a "move_up" command. In simulation this would just be like a small sphere that I can control with higher level commands (like move forward, turn left, turn right, etc) that can fly over say a table or bed in the environment.

CC @aclegg3 Can we make a quadrotor?

Also I noticed that in the youtube video the robot seems to be travelling quite a long distance quite smoothly. Would you be willing to open source that? Is that just one of the examples from habitat-api?

It is just the ppo-trainer's video mode (https://github.com/facebookresearch/habitat-api/blob/master/habitat_baselines/rl/ppo/ppo_trainer.py#L513-L530) with some extra goodies to add the text names, the radar thing for the goal and I made everything higher resolution.  It's been on my todo list to add those habitat-api, but I haven't gotten to it.

We can absolutely approximate a quadrotor with a collision sphere and force based control. You could enable physics, load your object, and then apply forces to it to counter gravity and for control (you could compute forces applied at 4 corner offsets in the local frame for a more accurate model). You could then manually sync the agent and/or camera state with the object's position to acquire observations.
My TODO list includes sphere primitives for collision which in this case would likely be necessary for training speed (mesh/mesh collision will be quite slow when close to walls). This might make a good physics example/tutorial task. 💭

You could then manually sync the agent and/or camera state with the object's position to acquire observations.

The agent's body is just a scene node, so we could probably control that directly?

The agent's body is just a scene node, so we could probably control that directly?

Yes, that is what I would do.

Great, Thanks! How far down your to-do list is this particular task? I completely understand that you might have other priorities. In that case I could get started on this myself with some directions from you on what particular classes in the code base deal with the spherical colliders etc. I've been trying to get my simulations to work since quite some time but Gibson doesn't scale for long time horizons because of large training times (GibsonV2 still is somewhat unstable and I'm not sure if the new dataset is ready) and it would be clutch if I could get Habitat to work now that it has Physics support.

@erikwijmans what are your thoughts on the mesh gap collision issue?

Here's another example from Circleville where the gap on the floor is all black. The same applies for the walls on the left side. Is there a way to fix this? I've been getting really bad training performance due to this. If I remember correctly Gibson uses some sort of neural network to fill in these gaps, is there something similar in Habitat?

what are your thoughts on the mesh gap collision issue?

Is what it is, the Gibson dataset is far from perfect, it has holes, that is the downside of working with real reconstructions.  There isn't a way I know of to fix this.  MP3D is definitely better from a navigation mesh stand-point btw, but still not perfect.  Replica is very very good in this regard, but it is still quite small.
The NN used in Gibson fills holes in just the RGB observations returned to the agent, not in the mesh.

Hmm. Interesting. Well if @aclegg3 and I can get the drone simulation to work that should still be fine for now since I don't have to worry about the floor in that case.

You could reproduce it by using build/viewer with Portal.glb and then once you're on top/near the mesh gap you'll see that the distance to the closest obstacle being printed in the terminal becomes zero.

@anoopsonar30, what is your concern: a visual appearance of the hole or how it's affecting collisions in Habitat? If the latter, can you describe what would be a right behavior from your perspective?
@anoopsonar30, are you requirements strict regarding sphere shape or a collision bounding box will be also suitable for the experiments?

@mathfac It's the effect on the collisions that's the main concern. Ideal behavior would be if we can fix the holes in the meshes but since that may not be easy to do in the short term, another quick fix could be - if the agent walks over a hole on the floor then it does not get detected as a collision. The holes on the walls don't matter as much since the walls get detected as obstacles on the agent's depth sensor. However this is not true for the holes on the floor and the agent walks straight into those. Or another thing would be to disable collisions with anything on the floor altogether if that's possible. This is because I'm working on a quadrotor simulation where the agent is always a certain height above the floor.
@mathfac No it does not have to be a sphere. Sorry if it seemed that way. I just used sphere as an example. It could pretty much just be a box collider. The important criterion is that it should be able to fly over obstacles which wasn't possible before the physics engine was introduced due to some navmesh restriction.

@anoopsonar30 I've created a branch quadrotor_prototype with bounding box collision, discrete contact checking, and an example script to get you started. Just install with --bullet to enable Bullet physics and run  python examples/quadrotor_prototype.py --control_mode=DYNAMIC (or --control_mode=KINEMATIC) to run the script and generate some video (assuming you are on a Unix system and you'll need ffmepg installed, otherwise you will need to comment some os.system() commands). You can replace the cheezit box placeholder object with your own object mesh by editing the "render mesh" path in  data/objects/cheezit.phys_properties.json or adding your own <name>.phys_properties.json and referencing it in data/default.phys_scene_config.json. Otherwise you will need to download our example object dataset for the default mesh.

Thanks a lot! You're a legend :) How did you choose the initial translation (the np.array that you hardcoded)? and the position of the 3rd person camera? Is there a way to generalize those arrays to all environments?

Moreover after adding -
102     agent_cfg.action_space = {
103     "move_forward": habitat_sim.agent.ActionSpec(
104         "move_forward", habitat_sim.agent.ActuationSpec(amount=0.25)
105         ),
106     "turn_left": habitat_sim.agent.ActionSpec(
107         "turn_left", habitat_sim.agent.ActuationSpec(amount=30.0)
108         ),
109     }

These actions have no effect. That is the agent doesn't move/rotate at all.
177             sim.step("move_forward")
178             sim.step("turn_left")

Thanks a lot! You're a legend :) How did you choose the initial translation (the np.array that you hardcoded)? and the position of the 3rd person camera? Is there a way to generalize those arrays to all environments? @aclegg3

You should be able to take the pointnav spawn locations in the Gibson PointNav dataset (https://github.com/facebookresearch/habitat-api#task-datasets) and just add some offset in +y to move if off the ground.

How did you choose the initial translation (the np.array that you hardcoded)? and the position of the 3rd person camera? Is there a way to generalize those arrays to all environments?

... Is there a way to generalize those arrays to all environments?

You should be able to take the pointnav spawn locations in the Gibson PointNav dataset (https://github.com/facebookresearch/habitat-api#task-datasets) and just add some offset in +y to move if off the ground.

You may want to use this approach in concert with the sim.contact_test(quadrotor_id) function to implement rejection sampling for a spawn point with no collisions. Something like:
initial_height = 1.0
possible_initial_point = sim.pathfinder.get_random_navigable_point() + np.array([0, initial_height, 0])
sim.set_translation(possible_initial_point, quadrotor_id)
while(sim.contact_test(quadrotor_id)):
   possible_initial_point = sim.pathfinder.get_random_navigable_point() + np.array([0, initial_height, 0])
   sim.set_translation(possible_initial_point, quadrotor_id)

I also tried
sim.get_agent(quadrotor_id).act("move_forward")
But it does not affect the quadrotor at all.

Thanks! @erikwijmans @aclegg3 Is there a way I might be able to use the sim.step or the above command?

Is there a way I might be able to use the sim.step or the above command? I guess I could find the agent's orientation and do some quaternion manipulation to rotate and move the agent forward but I thought that is what the above commands were abstracting anyway.

You are correct, that is the purpose of the agent action commands. However, the agent is not currently connected to the PhysicsManager objects. The script in this branch demonstrates how to move the object directly and sync the agent/camera for observations. However, for discrete kinematic control, a simple override of the step filter function to use the scene collision functions instead of the navmesh may suite you better.  I'll see about getting something together to bridge the gap for you.

@anoopsonar30, I've updated the branch to include a modified step filter for the agent actions which utilizes the contact_test function. Try running python examples/quadrotor_prototype_2.py. Actions are still discrete for now, but you can modify the act/observe loop resolution by adjusting the amount parameter in agent_cfg.action_space. This formulation should be trainable in Habitat-api with minimal modification.

File "examples/quadrotor_prototype_2.py", line 136, in <module>
sim.agents[0].controls.move_filter_fn = sim._scene_collision_step_filter
AttributeError: 'Simulator' object has no attribute '_scene_collision_step_filter'

Ran into this trivial error @aclegg3

This has to do with where the bindings are built when you install vs. where your environment is looking for them. I'm glad you found a solution.

Hey @anoopsonar30, I wanted to check in here to see how things are going. Any updates, questions, or feedback?

Thanks for checking in @aclegg3. I've been able to get the simulations up and running with no crashes. I wish we had a solution for the mesh gaps but it's good enough for now. I did however have 2 questions -

Since I've been running long time horizon simulations it's important that to train well, the robot be initialized at an "appropriate" translation and rotation such that it doesn't collide too early while the ideal controller is still being learned. Would there be a way to initialize the robot taking the semantics of the environment into consideration? I've noticed that with sample_navigable_point the robot gets initialized very close to walls/obstacles sometimes and hence crashes in the first few timesteps in many simulations since it's in a position where it's impossible to navigate or turn fast enough. Would there be a way to initialize the robot, say for example, in the center of a room or something like that so that it learns for longer without colliding too early? This is especially a problem since we're dealing with indoor environments which are quite cramped compared to other environments where drones might operate.

This is slightly more trivial and although I feel my modified code should work I haven't been able to achieve the desired effect. The goal is to disable the lookAt feature on the camera. Essentially I want the camera window to stay static and only point to the initial position of the quadrotor and not "look at" it as it moves.

To do this, I saved the initial rotation of the camera where it is looking at the quadrotor and then alternate the camera between first person for quadrotor and 3rd person with this fixed saved rotation. However for some reason it doesn't seem to work. Instead the camera point's in what seems like roughly the opposite direction.
136     initRotation = ut.quat_to_magnum
137                 ut.quat_look_at(
138                     sim.get_translation(quadrotor_id), static_3rd_person_camera_position
139                 )
140             )

164             sim.get_agent(0).scene_node.translation = np.array(
165                 static_3rd_person_camera_position
166             )
167             sim.get_agent(0).scene_node.rotation = initRotation
168
169             agent_observations = sim.get_sensor_observations()
170             save_observation(agent_observations, frame, envNum, "3rdperson_")
171
172             # reset the agent for the next step
173             sim.get_agent(0).scene_node.translation = sim.get_translation(quadrotor_id)
174             sim.get_agent(0).scene_node.rotation = sim.get_rotation(quadrotor_id)

Are you eventually planning to fill in the holes with something similar to the NNs in Gibson?

The hole filling used in Gibson is only on the observations, not the geometry/mesh itself, thus that really isn't desirable for our cases (the Gibson folks did the hole filling NN for a very different reason than reconstruction noise).  We are interested in fixing the geometry errors in the meshes, but automatic hole filling at the geometry level is an open area of research and I am unaware of anything that "just works".

Here's another example from Circleville where the gap on the floor is all black. The same applies for the walls on the left side. Is there a way to fix this? I've been getting really bad training performance due to this. If I remember correctly Gibson uses some sort of neural network to fill in these gaps, is there something similar in Habitat?

How did you get so realistic image? Do you use a large resolution? I used 224x224 but I can feel some "unrealistic" just by human eyes.

I just let the agent learn to deal with them. The agent doesn't seem to care about them and things seem to transfer fine to reality https://abhiskk.github.io/sim2real

How did you get so realistic image? Do you use a large resolution?

Yeah I'm probably using around 1920 x 1080 here or something similar. It's really cool that they support such high resolutions.

repo: facebookresearch/habitat-sim


text:
Simulator::addObject should add to the active scene graph

Motivation and Context
In response to issue #283.
Simulator::addObject takes a sceneID parameter for multi-scene use case. Since we don't support multi-scene physics presently, this should always add to the active scene graph instead.
This will need to be changed back in the future as we support multi-scene simulation.
How Has This Been Tested
Local testing with multiple sim.reconfigure() to create several sceneIDs in the Simulator.
Types of changes

[ ] Docs change / refactoring / dependency upgrade
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have completed my CLA (see CONTRIBUTING)
[ ] I have added tests to cover my changes.
[x] All new and existing tests passed.

IMO, it would make more sense to just set the default value of sceneID to activeSceneID_.

IMO, it would make more sense to just set the default value of sceneID to activeSceneID_.

Good thought, but there are multiple levels of default value = 0 as the function is passed through python bindings and into the simulator.py.


text:
Add isort to jupytext

Fixes a loop caused by pre-commit and isort.
Motivation and Context

Fixes a loop caused by jupytext and isort is the ipython notebook needs be isorted.
Makes jupytext manually run isort as part of the pipe.

How Has This Been Tested

Types of changes

[ ] Docs change / refactoring / dependency upgrade
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[X] I have read the CONTRIBUTING document.
[X] I have completed my CLA (see CONTRIBUTING)
[ ] I have added tests to cover my changes.
[X] All new and existing tests passed.

Okay, I added isort to jupytext, the next version will also add better isort support though so we should update as soon as the next jupytext version comes out. I also upgrade jupytext to the newest version.