Maximo

 View Only

Debugging Maximo Mobile App

  • 1.  Debugging Maximo Mobile App

    Posted 5 hours ago

    Hi all, 

    I am following this article to setup debugging - Maximo

    But, getting stuck at one point.

    I am running Docker on Ubuntu using WSL on my Windows PC. I open MAF using http://localhost:3001 and my preview is on port 3006.

    As per the last step of the article, I am running this command to get the live code from MAF - preview.preview("http://localhost:3006","techmobile",{live:true})

    But, I am getting the error as - 

    [preview]  Error: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:3006
        at checkAvailability (preview-client.js:281:17)
        at async preview-client.js:331:9
    _log    @    preview-client.js:112
    (anonymous)    @    preview-client.js:339
    await in (anonymous)        
    preview    @    preview-client.js:341
    (anonymous)    @    VM737:1

    I tried giving the IP address of my Windows PC and IP of my Ubuntu eth0 but failed. I also enabled port forwarding in Chrome Inspec window as 3006 to localhost:3006.

    After trying for some more time, if finally worked with http://localhost:3001. I don't know how because it's inconsitent. 

    But, when it worked, I made the changes in app.xml and I also got the prompt on my device that the changes are identified but changes weren't updated in the app. And I can see the following error:

    [preview]  <techmobile> Found changes. To kill the task, use preview.reset().
    preview-client.js:112 [preview]  INVALID_URL_ERR/CONNECTION_ERR found. Trying to resend the request to fetch the error message ...

    Another step is the article was to open and test MAF URL in the mobiler device if that's working. http://localhost:3001 didn't work but port 3006 worked on the mobile device's browser

    I am not sure what's wrong here. Can someone please advice?

    I am runnng my container with required GRAPHITE_PREVIEW parameter.

    docker run -it --privileged –-env GRAPHITE_PREVIEW=1 -p 3001:3001 -p 3006:3006 -v maximo_workspace_directory:/graphite/.workspace -it cp.icr.io/cp/manage/maf-tools:8.9

    Thanks.



    ------------------------------
    maximo User
    ------------------------------