react-native icon indicating copy to clipboard operation
react-native copied to clipboard

[Getting Started] Error: ignoring return value of function declared with warn_unused_result attribute

Open andresn opened this issue 10 years ago • 45 comments

Hi there, I'm snagged after a fresh install today:

$ react-native init AwesomeProject $ react-native run-ios

Full log: https://gist.github.com/andresn/1f35d718da9fc57542bb399460f2efd0#file-gistfile1-txt-L109

[email protected] [email protected] XCode Beta 8.0 Mac OS X El Capitan v.10.11.5

I think this is specific to having Xcode-beta 8.0 installed, because running the app through beta-7.3 does work.

andresn avatar Jul 05 '16 19:07 andresn

I had similar experience today. But it was on macOS beta. Build failed on both XCode 7.3.1 (7D1014) and 8.0 beta 2 (8S162m). I did try $ react-native run-ios but got error:

ERROR ENOENT: no such file or directory, lstat '/AwesomeProject/ios/build/ModuleCache/3F1D94PC0NUP2/AVFoundation-1M2ASOEW37WIZ.pcm-53d428b3' {"errno":-2,"code":"ENOENT","syscall":"lstat","path":"/AwesomeProject/ios/build/ModuleCache/3F1D94PC0NUP2/AVFoundation-1M2ASOEW37WIZ.pcm-53d428b3"} Error: ENOENT: no such file or directory, lstat '/AwesomeProject/ios/build/ModuleCache/3F1D94PC0NUP2/AVFoundation-1M2ASOEW37WIZ.pcm-53d428b3' at Error (native)

macOS: 10.12 Beta (16A239j) react-native-cli: 1.0.0 react-native: 0.29.0

Same two errors on both versions of XCode under Semantic Issue, when I tried build with XCode:

  • /AwesomeProject/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m:494:3: Ignoring return value of function declared with warn_unused_result attribute
    
  • /AwesomeProject/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m:1334:5: Ignoring return value of function declared with warn_unused_result attribute
    

Edit: Sorry, I forgot to mention that I was not able to install watchman.

liweiz avatar Jul 07 '16 15:07 liweiz

+1 on this, getting almost exactly the same output as OP 😭

Could be related to https://github.com/facebook/react-native/issues/8108?

samtgarson avatar Jul 10 '16 20:07 samtgarson

I'm also facing this error :(

cpruijsen avatar Jul 15 '16 03:07 cpruijsen

same :(

crsanthony avatar Jul 16 '16 18:07 crsanthony

I'm running into this issue as well. I'm on Xcode Version 8.0 beta 2. And OS X 10.11.5. I've got almost the same log too

huangkaiw3n avatar Jul 18 '16 10:07 huangkaiw3n

Same issue here :(

jlietart avatar Jul 19 '16 23:07 jlietart

Same issue here:(

adeolafadeyibi avatar Jul 20 '16 19:07 adeolafadeyibi

Same issue here:(

zhaop4133 avatar Jul 25 '16 03:07 zhaop4133

Same issue here on Xcode version 8.0 beta 3

isramartinez avatar Jul 25 '16 10:07 isramartinez

I uninstalled Xcode version 8.0 beta 3 and installed 7.3 and now everything works fine.

adeolafadeyibi avatar Jul 25 '16 12:07 adeolafadeyibi

Just doubleclick on the RCTWebSocket project in your navigator and remove the flags under build settings > custom compiler flags

schermafbeelding 2016-07-30 om 15 47 45

Your project should compile just fine now!

TimBroddin avatar Jul 30 '16 13:07 TimBroddin

@TimBroddin Thank you!!

alessiodionisi avatar Aug 01 '16 14:08 alessiodionisi

Having the same issue, but on XCode 7.2.1

I think the fact that upgrading XCode fixes this for some people has more to do with temporary files being retained somewhere and the installer deletes them.

What is the -proper- way to clear a working directory and rerun a build with react-native? I'm having problems with rebuilding and having components that have been deleted or renamed still causing errors, which means that some part of the build is not removing intermediate results between builds.

jdmarshall avatar Aug 02 '16 18:08 jdmarshall

Thanks for this!!

danawhite avatar Aug 15 '16 13:08 danawhite

Fixed by https://github.com/facebook/react-native/commit/2f788524112d59f62a295e7f4b0c1cfa0f6203fe

javache avatar Aug 16 '16 15:08 javache

How to upgrade to this version o this code in a "old" project @javache?

sirgalleto avatar Aug 25 '16 16:08 sirgalleto

We don't release patches for old releases, but you can apply these changes yourself.

javache avatar Aug 25 '16 21:08 javache

Oh thanks. I'll try

sirgalleto avatar Aug 25 '16 22:08 sirgalleto

Thanks @TimBroddin - it worked for me too!

tristanbbq avatar Sep 13 '16 14:09 tristanbbq

@TimBroddin your the man!

jmitch0901 avatar Sep 16 '16 17:09 jmitch0901