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

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.

Author: Fantashit

6 thoughts on “[Getting Started] Error: ignoring return value of function declared with warn_unused_result attribute

  1. 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.

  2. 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!

  3. @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.

Comments are closed.

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

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.

Author: Fantashit

4 thoughts on “[Getting Started] Error: ignoring return value of function declared with warn_unused_result attribute

  1. 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.

  2. 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!

  3. @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.

Comments are closed.