Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
andresn opened this issue Jul 5, 2016 · 45 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@andresn
Copy link

andresn commented Jul 5, 2016

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

react-native@0.28.0
react-native-cli@1.0.0
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.

@liweiz
Copy link

liweiz commented Jul 7, 2016

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.

@samtgarson
Copy link

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

Could be related to #8108?

@cpruijsen
Copy link

I'm also facing this error :(

@crsanthony
Copy link

same :(

@huangkaiw3n
Copy link

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

@jlietart
Copy link

Same issue here :(

@adeolafadeyibi
Copy link

Same issue here:(

1 similar comment
@zhaop4133
Copy link

Same issue here:(

@isramartinez
Copy link

Same issue here on Xcode version 8.0 beta 3

@adeolafadeyibi
Copy link

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

@TimBroddin
Copy link

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!

@alessiodionisi
Copy link

alessiodionisi commented Aug 1, 2016

@TimBroddin Thank you!!

@jdmarshall
Copy link

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.

@danawhite
Copy link

Thanks for this!!

@javache
Copy link
Member

javache commented Aug 16, 2016

Fixed by 2f78852

@javache javache closed this as completed Aug 16, 2016
@sirgalleto
Copy link

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

@javache
Copy link
Member

javache commented Aug 25, 2016

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

@sirgalleto
Copy link

Oh thanks. I'll try

@tristanbbq
Copy link

Thanks @TimBroddin - it worked for me too!

@jmitch0901
Copy link

@TimBroddin your the man!

@seanfuture
Copy link

@edin-m's solution of (void) in front of line temporarily worked for us on Sierra .. TY

@noprom
Copy link

noprom commented Oct 27, 2016

Also faced with this problem, but my settings here is empty:
1

Here is my environment:

react-native-cli: 1.0.0
react-native: 0.32.0
xcode:Version 8.0 (8A218a)
mac:10.12 (16A323)

Thanks in advance.

@breadadams
Copy link

@noprom it looks like you're searching in your main project. If you click RCTWebSocket in the sidebar, and then search in Build Settings, you should see it.

chaihuoa added a commit to chaihuoa/dogsay that referenced this issue Nov 21, 2016
1. ignoring return value of function declared with warn_unused_result attribute
facebook/react-native#8584
2. Environment Variables -> Add -> Name: "OS_ACTIVITY_MODE", Value:"disable"
@xugy0926
Copy link

@TimBroddin i love u

@jtanori
Copy link

jtanori commented Dec 8, 2016

@TimBroddin you are the MVP here.

@heliosPortal
Copy link

@TimBroddin, Bless your children, give them names...

@dhwrwmgwra
Copy link

@TimBroddin You rock

@qxqxqxqx
Copy link

@dwilt I do take a while to figure it out,hahaha

@IWantToLearnCoding
Copy link

@TimBroddin God bless you children...

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests