Sentry-javascript: corbeau-js ne fonctionne pas avec une application angular-cli standard

Créé le 24 août 2017  ·  10Commentaires  ·  Source: getsentry/sentry-javascript

Dès que raven-js est appelé, l'application angulaire ne fonctionne plus mais démarre seulement une sorte de boucle infinie :

Uncaught RangeError: Maximum call stack size exceeded at http://localhost:4200/polyfills.bundle.js:5303:31 at XMLHttpRequest.proto.(anonymous function) (http://localhost:4200/polyfills.bundle.js:3819:24) at XMLHttpRequest.open (http://localhost:4200/vendor.bundle.js:4636:37) at Raven._makeRequest (http://localhost:4200/vendor.bundle.js:5317:17) at Raven._sendProcessedPayload (http://localhost:4200/vendor.bundle.js:5241:56) at Raven._send (http://localhost:4200/vendor.bundle.js:5183:22) at Raven._processException (http://localhost:4200/vendor.bundle.js:4957:14) at Raven._handleStackInfo (http://localhost:4200/vendor.bundle.js:4863:14) at Raven.captureException (http://localhost:4200/vendor.bundle.js:4001:18) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3937:22) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29) at XMLHttpRequest.wrapFn (http://localhost:4200/polyfills.bundle.js:3620:39) at XMLHttpRequest.wrapped [as __zone_symbol__ON_PROPERTYreadystatechange] (http://localhost:4200/vendor.bundle.js:3934:29)

Démarrez une nouvelle application angular-cli en utilisant ng new, ajoutez la dépendance npm raven-js, importez et appelez-la depuis app.module.ts,
Il s'agit d'un référentiel minimal contenant uniquement une application angular-cli vide, le dep raven-js et juste le code d'initialisation (Raven.config().install() suffit pour déclencher le problème) : https://github.com/ esistgut/raventest

Commentaire le plus utile

nous avons retrouvé la cause à [email protected] , avec la version mineure précédente, 0.8.16 tout fonctionne toujours

Tous les 10 commentaires

nous avons retrouvé la cause à [email protected] , avec la version mineure précédente, 0.8.16 tout fonctionne toujours

Je vis ça aussi.

Même problème ici avec angluar-cli 1.4.0 et zone.js 0.8.16.

Les erreurs de console suivantes sont renvoyées :
Firefox : InternalError : trop de récursivité
Autres navigateurs : RangeError : taille maximale de la pile d'appels dépassée

Est-il probable que ce problème puisse être résolu dans une future version de Raven ? Je préférerais ne pas avoir à verrouiller ma version de zone.js pour ce genre de problème de compatibilité.

+1

@LukasKlement @rtm @mkoczorowski , ce problème n'est pas du côté de l'implémentation de Raven.js, mais plutôt de Zone.js. Heureusement, ils l'ont déjà corrigé il y a 5 jours et les choses fonctionnent correctement maintenant.
Il doit juste être publié en tant que version corrigée de npm. Veuillez voir 2 commits récents du 6 septembre – https://github.com/angular/zone.js/commits/master

Vous pouvez le tester vous-même localement en changeant votre zone.js dans votre package.json en [email protected]:angular/zone.js.git#d4e5ae8f6e72f0b4ef8e816e369530b72e582ba7 , par exemple.

"zone.js": "[email protected]:angular/zone.js.git#d4e5ae8f6e72f0b4ef8e816e369530b72e582ba7"

Pour être plus précis (car il existe encore de nombreux rapports sur ce problème), c'est le commit qui le corrigera - https://github.com/angular/zone.js/commit/d4e5ae8f6e72f0b4ef8e816e369530b72e582ba7

Roulez dessus !
La mise zone.js niveau de 0.8.18 fonctionné pour mon application Angular v.4+.

@kblestarge

Es-tu sûr ? Je viens de mettre à niveau zone.js vers 0.8.18 et j'ai toujours l'erreur de boucle :(

@ mxman06 cela fonctionne pour moi avec zone.js 0.8.18 - il y a peut-être un autre coupable ?

Cette page vous a été utile?
0 / 5 - 0 notes