GithubHelp home page GithubHelp logo

Comments (5)

Swatto avatar Swatto commented on April 28, 2024

I have the exact same issue and here's the errors stack.

2015-04-27 11:14:32.447 SRLnative[55206:1055048] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid number value (NaN) in JSON write'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010d481c65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010c59bbb7 objc_exception_throw + 45
    2   CoreFoundation                      0x000000010d481b9d +[NSException raise:format:] + 205
    3   Foundation                          0x000000010c239c26 _writeJSONNumber + 748
    4   Foundation                          0x000000010c235efc _writeJSONValue + 477
    5   Foundation                          0x000000010c23a46f ___writeJSONObject_block_invoke + 220
    6   CoreFoundation                      0x000000010d3f5cd5 __65-[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 85
    7   CoreFoundation                      0x000000010d3f5bec -[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:] + 236
    8   Foundation                          0x000000010c23a080 _writeJSONObject + 376
    9   Foundation                          0x000000010c235ea6 _writeJSONValue + 391
    10  Foundation                          0x000000010c23a34d ___writeJSONArray_block_invoke + 130
    11  CoreFoundation                      0x000000010d3cb026 __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 70
    12  CoreFoundation                      0x000000010d3caf5c -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 284
    13  Foundation                          0x000000010c23a262 _writeJSONArray + 264
    14  Foundation                          0x000000010c235f3c _writeJSONValue + 541
    15  Foundation                          0x000000010c23a34d ___writeJSONArray_block_invoke + 130
    16  CoreFoundation                      0x000000010d3cb026 __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 70
    17  CoreFoundation                      0x000000010d3caf5c -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 284
    18  Foundation                          0x000000010c23a262 _writeJSONArray + 264
    19  Foundation                          0x000000010c235f3c _writeJSONValue + 541
    20  Foundation                          0x000000010c23a46f ___writeJSONObject_block_invoke + 220
    21  CoreFoundation                      0x000000010d3f5cd5 __65-[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 85
    22  CoreFoundation                      0x000000010d3f5bec -[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:] + 236
    23  Foundation                          0x000000010c23a080 _writeJSONObject + 376
    24  Foundation                          0x000000010c235ea6 _writeJSONValue + 391
    25  Foundation                          0x000000010c23a34d ___writeJSONArray_block_invoke + 130
    26  CoreFoundation                      0x000000010d3cb026 __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 70
    27  CoreFoundation                      0x000000010d3caf5c -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 284
    28  Foundation                          0x000000010c23a262 _writeJSONArray + 264
    29  Foundation                          0x000000010c235f3c _writeJSONValue + 541
    30  Foundation                          0x000000010c23a34d ___writeJSONArray_block_invoke + 130
    31  CoreFoundation                      0x000000010d3cb026 __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 70
    32  CoreFoundation                      0x000000010d3caf5c -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 284
    33  Foundation                          0x000000010c23a262 _writeJSONArray + 264
    34  Foundation                          0x000000010c235f3c _writeJSONValue + 541
    35  Foundation                          0x000000010c235cea -[_NSJSONWriter dataWithRootObject:options:error:] + 137
    36  Foundation                          0x000000010c23876b +[NSJSONSerialization dataWithJSONObject:options:error:] + 345
    37  SRLnative                           0x000000010bf2967b RCTJSONStringify + 91
    38  SRLnative                           0x000000010bf19985 __62-[RCTContextExecutor executeJSCall:method:arguments:callback:]_block_invoke + 133
    39  SRLnative                           0x000000010bf1a9d8 -[RCTContextExecutor executeBlockOnJavaScriptQueue:] + 248
    40  Foundation                          0x000000010c14d69a __NSThreadPerformPerform + 299
    41  CoreFoundation                      0x000000010d3b5431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    42  CoreFoundation                      0x000000010d3ab2fd __CFRunLoopDoSources0 + 269
    43  CoreFoundation                      0x000000010d3aa934 __CFRunLoopRun + 868
    44  CoreFoundation                      0x000000010d3aa366 CFRunLoopRunSpecific + 470
    45  SRLnative                           0x000000010bf18861 +[RCTContextExecutor runRunLoopThread] + 369
    46  Foundation                          0x000000010c15009d __NSThread__main__ + 1194
    47  libsystem_pthread.dylib             0x0000000110df7268 _pthread_body + 131
    48  libsystem_pthread.dylib             0x0000000110df71e5 _pthread_body + 0
    49  libsystem_pthread.dylib             0x0000000110df541d thread_start + 13

Precisely, I'm loading a m3u8 from the Twitch API that add arguments to the URL (token, etc)

from react-native-video.

stephendeyoung avatar stephendeyoung commented on April 28, 2024

Yes actually I get that error stack too @Swatto

from react-native-video.

brentvatne avatar brentvatne commented on April 28, 2024

Nice idea, @stephendeyoung @Swatto do either of you have time to look into how to accomplish this?

from react-native-video.

stephendeyoung avatar stephendeyoung commented on April 28, 2024

I can give it a go. I'd imagine this is going to require some iOS dev knowledge. I've never done anything with iOS or Objective C/Swift before. If you're able to give me any pointers to documentation for AV Foundation that would be great.

from react-native-video.

brentvatne avatar brentvatne commented on April 28, 2024

@stephendeyoung - this looks like the easiest way: https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/02_Playback.html#//apple_ref/doc/uid/TP40010188-CH3-SW1 - scroll down to To create and prepare an HTTP live stream for playback

Alternatively, this seems like another robust solution: https://developer.apple.com/library/ios/samplecode/StitchedStreamPlayer/Introduction/Intro.html

from react-native-video.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.