Git Product home page Git Product logo

Comments (8)

peaBerberian avatar peaBerberian commented on July 1, 2024

Hello @eduter ,

I'm not sure of how a global error handler (like window.onerror?) is able to catch that error as all errors happening inside the RxPlayer should already be catched (maybe we missed some?). Here for example, for the event to be triggered, we had to catch the error and run our event triggering logic.

Is it the same error that is catched globally?

from rx-player.

eduter avatar eduter commented on July 1, 2024

Yes, window.onerror catches it, it is the same error I get in the event listener (I compared them with ===), and this always gets printed to the console:

Uncaught MediaError: MediaError (MANIFEST_PARSE_ERROR) No supported video adaptations
    MediaError media_error.js:47
    adaptations period.js:56
    Period period.js:36
    periods manifest.js:85
    Manifest manifest.js:83
    processMpdParserResponse manifest_parser.js:102
    runDefaultJsParser manifest_parser.js:86
    manifestParser manifest_parser.js:44
    _parseLoadedManifest manifest_fetcher.js:211
    RxJS 8
    fetch manifest_fetcher.js:124
    promise callback*../node_modules/rx-player/dist/_esm5.processed/core/fetchers/manifest/manifest_fetcher.js/ManifestFetcher.prototype.fetch/< manifest_fetcher.js:122
    RxJS 20
    _priv_initializeContentPlayback public_api.js:401
    loadVideo public_api.js:278

from rx-player.

peaBerberian avatar peaBerberian commented on July 1, 2024

I looked around but I still fail to see where this might happen.

I think devtools like those in Firefox or Chrome are able to pause on uncatched errors. Can you run with this activated so we can pinpoint where this is going on?

from rx-player.

eduter avatar eduter commented on July 1, 2024

The error is thrown inside the Period constructor. The first few entries in the call stack seem to map to these lines:

throw new MediaError("MANIFEST_PARSE_ERROR",

const period = new Period(parsedPeriod, representationFilter);

const manifest = new Manifest(parserResponse.value.parsed, options);

return this._parseLoadedManifest(response, parserOptions);

I'm not sure how it ends up here, but it seems like RxJS re-throws the error here:
https://github.com/ReactiveX/rxjs/blob/6fa819beb91ba99dadd6262d6c13f7ddfd9470c5/src/internal/util/reportUnhandledError.ts#L21

from rx-player.

peaBerberian avatar peaBerberian commented on July 1, 2024

Hi, you're right, it seems that the uncatched one is the one found in RxJS.

From its code documentation reportUnhandledError seems to be called when "there is an error that is out-of-band with the subscription or when an error hits a terminal boundary of the subscription and no error handler was provided".

Though I don't know in which case we're here nor why as to trigger the "error" event, we should have handled it. Maybe the logic is ran multiple times in our case (wouldn't be the first time it happens with RxJS) and only the first is handled?

Can you check if the issue is still present in our last development build [email protected]?
We removed our dependency to RxJS from it, one of the reason being to prevent such complexities to happen.

from rx-player.

eduter avatar eduter commented on July 1, 2024

I've tested the development build and it no longer triggers window.onerror or prints the error to the console 👍
For some reason, both Firefox and Chrome still pause when "pause on exceptions" is checked, even with "pause on caught exceptions" unchecked, but that is not really a problem.

from rx-player.

peaBerberian avatar peaBerberian commented on July 1, 2024

OK :) thanks.

For some reason, both Firefox and Chrome still pause when "pause on exceptions" is checked, even with "pause on caught exceptions" unchecked, but that is not really a problem.

Very strange, it may hide something. I will check this, thanks again.

from rx-player.

peaBerberian avatar peaBerberian commented on July 1, 2024

Now that the v3.30.0 is release you shouldn't have the problem anymore.

Do not hesitate to re-open this issue if you still have the problem.

from rx-player.

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.