Error while running Agora video on production server, works locally












0















I am trying to create a video chat using Angular 6 and Agora Web v2.50 SDK. I followed the tutorial on this link,
https://medium.com/@Anderson7301/building-a-video-chat-app-with-agora-and-angular-6-858d72b6fa0d
I was able to successfully implement this on my local machine but when I try to run it on the server I am getting “main.c71419ff14e542f66f51.js:1 ERROR TypeError: o.default.debug is not a function”.
Can you please help me with. The server is running on SSL.



Update - 11/20/2018



I figured out that I needed to use the Dynamic Key for making the video chat work on the server. So I used the Dynamickey Generation Java code and created the token and while trying to join the user I am getting "Agora-SDK [ERROR]: User join failed [ERR_NO_AUTHORIZED]". Here's the log from my angular application.



11:24:34:202 Agora-SDK [INFO]: Creating client , MODE : interop CODEC : vp8
AgoraRTCSDK.min.js:2



11:24:34:215 Agora-SDK [INFO]: Initializing AgoraRTC client, appId: 1d82f0b2b87d445d81dfb2caf4f5e5b9.
AgoraRTCSDK.min.js:2



11:24:34:264 Agora-SDK [INFO]: Initializing AgoraRTC client, appId: 1d82f0b2b87d445d81dfb2caf4f5e5b9.



active.component.ts:649 AgoraRTC client initialized
AgoraRTCSDK.min.js:2



11:24:34:272 Agora-SDK [DEBUG]: Connect to choose_server: https://ap-web-1.agora.io/api/v1
AgoraRTCSDK.min.js:2



11:24:34:282 Agora-SDK [DEBUG]: Connect to choose_server: https://ap-web-2.agoraio.cn/api/v1
AgoraRTCSDK.min.js:2



11:24:34:951 Agora-SDK [DEBUG]: Get gateway address: (3) ["webrtc-159-117-159-4.agora.io:5875", "webrtc-128-1-33-131.agora.io:5866", "webrtc-159-117-159-3.agora.io:5870"]
AgoraRTCSDK.min.js:2



11:24:34:957 Agora-SDK [INFO]: Joining channel: 1000
AgoraRTCSDK.min.js:2 11:24:34:964 Agora-SDK [DEBUG]: register client Channel 1000 Uid 1587154302
AgoraRTCSDK.min.js:2



11:24:34:973 Agora-SDK [DEBUG]: start connect:webrtc-159-117-159-4.agora.io:5875
AgoraRTCSDK.min.js:2



11:24:35:131 Agora-SDK [DEBUG]: websockect opened: webrtc-159-117-159-4.agora.io:5875
AgoraRTCSDK.min.js:2



11:24:35:235 Agora-SDK [DEBUG]: Connected to gateway server
AgoraRTCSDK.min.js:2



11:24:39:336 Agora-SDK [ERROR]: User join failed [ERR_NO_AUTHORIZED]



The Dynamic token generated is 005AQAoAEY5MDBDNERFRkMxNzdDMkJGRjc5QUY5NDY2QTVEMDYzRTY4QTJCMDEQAB2C8LK4fURdgd+yyvT15bmaofNbWm6O7wAAAAAAAA==



AppId for my Project is 1d82f0b2b87d445d81dfb2caf4f5e5b9



thanks for your help in advance










share|improve this question




















  • 2





    Welcome to stackoverflow! Please take the tour and read the help pages. Helpful may be "how to ask good questions" and this question checklist. Users here are way more ready to help if you provide minimal, complete, and verifiable example with some input and the desired output.

    – Mikhail Stepanov
    Nov 14 '18 at 9:16











  • Please give us a more detailed reproduction on this issue, like does it work without SSL? Does it work in development environment on the server?

    – hxpax
    Nov 16 '18 at 2:41
















0















I am trying to create a video chat using Angular 6 and Agora Web v2.50 SDK. I followed the tutorial on this link,
https://medium.com/@Anderson7301/building-a-video-chat-app-with-agora-and-angular-6-858d72b6fa0d
I was able to successfully implement this on my local machine but when I try to run it on the server I am getting “main.c71419ff14e542f66f51.js:1 ERROR TypeError: o.default.debug is not a function”.
Can you please help me with. The server is running on SSL.



Update - 11/20/2018



I figured out that I needed to use the Dynamic Key for making the video chat work on the server. So I used the Dynamickey Generation Java code and created the token and while trying to join the user I am getting "Agora-SDK [ERROR]: User join failed [ERR_NO_AUTHORIZED]". Here's the log from my angular application.



11:24:34:202 Agora-SDK [INFO]: Creating client , MODE : interop CODEC : vp8
AgoraRTCSDK.min.js:2



11:24:34:215 Agora-SDK [INFO]: Initializing AgoraRTC client, appId: 1d82f0b2b87d445d81dfb2caf4f5e5b9.
AgoraRTCSDK.min.js:2



11:24:34:264 Agora-SDK [INFO]: Initializing AgoraRTC client, appId: 1d82f0b2b87d445d81dfb2caf4f5e5b9.



active.component.ts:649 AgoraRTC client initialized
AgoraRTCSDK.min.js:2



11:24:34:272 Agora-SDK [DEBUG]: Connect to choose_server: https://ap-web-1.agora.io/api/v1
AgoraRTCSDK.min.js:2



11:24:34:282 Agora-SDK [DEBUG]: Connect to choose_server: https://ap-web-2.agoraio.cn/api/v1
AgoraRTCSDK.min.js:2



11:24:34:951 Agora-SDK [DEBUG]: Get gateway address: (3) ["webrtc-159-117-159-4.agora.io:5875", "webrtc-128-1-33-131.agora.io:5866", "webrtc-159-117-159-3.agora.io:5870"]
AgoraRTCSDK.min.js:2



11:24:34:957 Agora-SDK [INFO]: Joining channel: 1000
AgoraRTCSDK.min.js:2 11:24:34:964 Agora-SDK [DEBUG]: register client Channel 1000 Uid 1587154302
AgoraRTCSDK.min.js:2



11:24:34:973 Agora-SDK [DEBUG]: start connect:webrtc-159-117-159-4.agora.io:5875
AgoraRTCSDK.min.js:2



11:24:35:131 Agora-SDK [DEBUG]: websockect opened: webrtc-159-117-159-4.agora.io:5875
AgoraRTCSDK.min.js:2



11:24:35:235 Agora-SDK [DEBUG]: Connected to gateway server
AgoraRTCSDK.min.js:2



11:24:39:336 Agora-SDK [ERROR]: User join failed [ERR_NO_AUTHORIZED]



The Dynamic token generated is 005AQAoAEY5MDBDNERFRkMxNzdDMkJGRjc5QUY5NDY2QTVEMDYzRTY4QTJCMDEQAB2C8LK4fURdgd+yyvT15bmaofNbWm6O7wAAAAAAAA==



AppId for my Project is 1d82f0b2b87d445d81dfb2caf4f5e5b9



thanks for your help in advance










share|improve this question




















  • 2





    Welcome to stackoverflow! Please take the tour and read the help pages. Helpful may be "how to ask good questions" and this question checklist. Users here are way more ready to help if you provide minimal, complete, and verifiable example with some input and the desired output.

    – Mikhail Stepanov
    Nov 14 '18 at 9:16











  • Please give us a more detailed reproduction on this issue, like does it work without SSL? Does it work in development environment on the server?

    – hxpax
    Nov 16 '18 at 2:41














0












0








0








I am trying to create a video chat using Angular 6 and Agora Web v2.50 SDK. I followed the tutorial on this link,
https://medium.com/@Anderson7301/building-a-video-chat-app-with-agora-and-angular-6-858d72b6fa0d
I was able to successfully implement this on my local machine but when I try to run it on the server I am getting “main.c71419ff14e542f66f51.js:1 ERROR TypeError: o.default.debug is not a function”.
Can you please help me with. The server is running on SSL.



Update - 11/20/2018



I figured out that I needed to use the Dynamic Key for making the video chat work on the server. So I used the Dynamickey Generation Java code and created the token and while trying to join the user I am getting "Agora-SDK [ERROR]: User join failed [ERR_NO_AUTHORIZED]". Here's the log from my angular application.



11:24:34:202 Agora-SDK [INFO]: Creating client , MODE : interop CODEC : vp8
AgoraRTCSDK.min.js:2



11:24:34:215 Agora-SDK [INFO]: Initializing AgoraRTC client, appId: 1d82f0b2b87d445d81dfb2caf4f5e5b9.
AgoraRTCSDK.min.js:2



11:24:34:264 Agora-SDK [INFO]: Initializing AgoraRTC client, appId: 1d82f0b2b87d445d81dfb2caf4f5e5b9.



active.component.ts:649 AgoraRTC client initialized
AgoraRTCSDK.min.js:2



11:24:34:272 Agora-SDK [DEBUG]: Connect to choose_server: https://ap-web-1.agora.io/api/v1
AgoraRTCSDK.min.js:2



11:24:34:282 Agora-SDK [DEBUG]: Connect to choose_server: https://ap-web-2.agoraio.cn/api/v1
AgoraRTCSDK.min.js:2



11:24:34:951 Agora-SDK [DEBUG]: Get gateway address: (3) ["webrtc-159-117-159-4.agora.io:5875", "webrtc-128-1-33-131.agora.io:5866", "webrtc-159-117-159-3.agora.io:5870"]
AgoraRTCSDK.min.js:2



11:24:34:957 Agora-SDK [INFO]: Joining channel: 1000
AgoraRTCSDK.min.js:2 11:24:34:964 Agora-SDK [DEBUG]: register client Channel 1000 Uid 1587154302
AgoraRTCSDK.min.js:2



11:24:34:973 Agora-SDK [DEBUG]: start connect:webrtc-159-117-159-4.agora.io:5875
AgoraRTCSDK.min.js:2



11:24:35:131 Agora-SDK [DEBUG]: websockect opened: webrtc-159-117-159-4.agora.io:5875
AgoraRTCSDK.min.js:2



11:24:35:235 Agora-SDK [DEBUG]: Connected to gateway server
AgoraRTCSDK.min.js:2



11:24:39:336 Agora-SDK [ERROR]: User join failed [ERR_NO_AUTHORIZED]



The Dynamic token generated is 005AQAoAEY5MDBDNERFRkMxNzdDMkJGRjc5QUY5NDY2QTVEMDYzRTY4QTJCMDEQAB2C8LK4fURdgd+yyvT15bmaofNbWm6O7wAAAAAAAA==



AppId for my Project is 1d82f0b2b87d445d81dfb2caf4f5e5b9



thanks for your help in advance










share|improve this question
















I am trying to create a video chat using Angular 6 and Agora Web v2.50 SDK. I followed the tutorial on this link,
https://medium.com/@Anderson7301/building-a-video-chat-app-with-agora-and-angular-6-858d72b6fa0d
I was able to successfully implement this on my local machine but when I try to run it on the server I am getting “main.c71419ff14e542f66f51.js:1 ERROR TypeError: o.default.debug is not a function”.
Can you please help me with. The server is running on SSL.



Update - 11/20/2018



I figured out that I needed to use the Dynamic Key for making the video chat work on the server. So I used the Dynamickey Generation Java code and created the token and while trying to join the user I am getting "Agora-SDK [ERROR]: User join failed [ERR_NO_AUTHORIZED]". Here's the log from my angular application.



11:24:34:202 Agora-SDK [INFO]: Creating client , MODE : interop CODEC : vp8
AgoraRTCSDK.min.js:2



11:24:34:215 Agora-SDK [INFO]: Initializing AgoraRTC client, appId: 1d82f0b2b87d445d81dfb2caf4f5e5b9.
AgoraRTCSDK.min.js:2



11:24:34:264 Agora-SDK [INFO]: Initializing AgoraRTC client, appId: 1d82f0b2b87d445d81dfb2caf4f5e5b9.



active.component.ts:649 AgoraRTC client initialized
AgoraRTCSDK.min.js:2



11:24:34:272 Agora-SDK [DEBUG]: Connect to choose_server: https://ap-web-1.agora.io/api/v1
AgoraRTCSDK.min.js:2



11:24:34:282 Agora-SDK [DEBUG]: Connect to choose_server: https://ap-web-2.agoraio.cn/api/v1
AgoraRTCSDK.min.js:2



11:24:34:951 Agora-SDK [DEBUG]: Get gateway address: (3) ["webrtc-159-117-159-4.agora.io:5875", "webrtc-128-1-33-131.agora.io:5866", "webrtc-159-117-159-3.agora.io:5870"]
AgoraRTCSDK.min.js:2



11:24:34:957 Agora-SDK [INFO]: Joining channel: 1000
AgoraRTCSDK.min.js:2 11:24:34:964 Agora-SDK [DEBUG]: register client Channel 1000 Uid 1587154302
AgoraRTCSDK.min.js:2



11:24:34:973 Agora-SDK [DEBUG]: start connect:webrtc-159-117-159-4.agora.io:5875
AgoraRTCSDK.min.js:2



11:24:35:131 Agora-SDK [DEBUG]: websockect opened: webrtc-159-117-159-4.agora.io:5875
AgoraRTCSDK.min.js:2



11:24:35:235 Agora-SDK [DEBUG]: Connected to gateway server
AgoraRTCSDK.min.js:2



11:24:39:336 Agora-SDK [ERROR]: User join failed [ERR_NO_AUTHORIZED]



The Dynamic token generated is 005AQAoAEY5MDBDNERFRkMxNzdDMkJGRjc5QUY5NDY2QTVEMDYzRTY4QTJCMDEQAB2C8LK4fURdgd+yyvT15bmaofNbWm6O7wAAAAAAAA==



AppId for my Project is 1d82f0b2b87d445d81dfb2caf4f5e5b9



thanks for your help in advance







video angular6 agora.io






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 20 '18 at 6:07







Girish Poojari

















asked Nov 14 '18 at 9:05









Girish PoojariGirish Poojari

42




42








  • 2





    Welcome to stackoverflow! Please take the tour and read the help pages. Helpful may be "how to ask good questions" and this question checklist. Users here are way more ready to help if you provide minimal, complete, and verifiable example with some input and the desired output.

    – Mikhail Stepanov
    Nov 14 '18 at 9:16











  • Please give us a more detailed reproduction on this issue, like does it work without SSL? Does it work in development environment on the server?

    – hxpax
    Nov 16 '18 at 2:41














  • 2





    Welcome to stackoverflow! Please take the tour and read the help pages. Helpful may be "how to ask good questions" and this question checklist. Users here are way more ready to help if you provide minimal, complete, and verifiable example with some input and the desired output.

    – Mikhail Stepanov
    Nov 14 '18 at 9:16











  • Please give us a more detailed reproduction on this issue, like does it work without SSL? Does it work in development environment on the server?

    – hxpax
    Nov 16 '18 at 2:41








2




2





Welcome to stackoverflow! Please take the tour and read the help pages. Helpful may be "how to ask good questions" and this question checklist. Users here are way more ready to help if you provide minimal, complete, and verifiable example with some input and the desired output.

– Mikhail Stepanov
Nov 14 '18 at 9:16





Welcome to stackoverflow! Please take the tour and read the help pages. Helpful may be "how to ask good questions" and this question checklist. Users here are way more ready to help if you provide minimal, complete, and verifiable example with some input and the desired output.

– Mikhail Stepanov
Nov 14 '18 at 9:16













Please give us a more detailed reproduction on this issue, like does it work without SSL? Does it work in development environment on the server?

– hxpax
Nov 16 '18 at 2:41





Please give us a more detailed reproduction on this issue, like does it work without SSL? Does it work in development environment on the server?

– hxpax
Nov 16 '18 at 2:41












1 Answer
1






active

oldest

votes


















0














I have the same problem with
TypeError: o.default.debug when running in an Angular production build. It looks like the Agora library does not play well with the JS minifier which is used by Angular CLI in production builds.
The only workaround I've come up so far is to set



"optimization": false



in angular.json, but that for sure is a very bad workaround.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53296428%2ferror-while-running-agora-video-on-production-server-works-locally%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I have the same problem with
    TypeError: o.default.debug when running in an Angular production build. It looks like the Agora library does not play well with the JS minifier which is used by Angular CLI in production builds.
    The only workaround I've come up so far is to set



    "optimization": false



    in angular.json, but that for sure is a very bad workaround.






    share|improve this answer




























      0














      I have the same problem with
      TypeError: o.default.debug when running in an Angular production build. It looks like the Agora library does not play well with the JS minifier which is used by Angular CLI in production builds.
      The only workaround I've come up so far is to set



      "optimization": false



      in angular.json, but that for sure is a very bad workaround.






      share|improve this answer


























        0












        0








        0







        I have the same problem with
        TypeError: o.default.debug when running in an Angular production build. It looks like the Agora library does not play well with the JS minifier which is used by Angular CLI in production builds.
        The only workaround I've come up so far is to set



        "optimization": false



        in angular.json, but that for sure is a very bad workaround.






        share|improve this answer













        I have the same problem with
        TypeError: o.default.debug when running in an Angular production build. It looks like the Agora library does not play well with the JS minifier which is used by Angular CLI in production builds.
        The only workaround I've come up so far is to set



        "optimization": false



        in angular.json, but that for sure is a very bad workaround.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 26 '18 at 9:25









        MarkusMarkus

        133




        133






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53296428%2ferror-while-running-agora-video-on-production-server-works-locally%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            Xamarin.form Move up view when keyboard appear

            Post-Redirect-Get with Spring WebFlux and Thymeleaf

            Anylogic : not able to use stopDelay()