1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Strange error from laravel Backend REST API request

Discussion in 'PHP' started by mstdmstd, Dec 15, 2019.

  1. #1
    Hello,
    I make @vue/cli 4.0.5 / vuex 3 app with data reading from Laravel 5.8 Backend REST API app
    
    I uploaded my app on Ubuntu server (Digital Ocean) about 2 weeks ago and today I found that my app does not work
    as all requests to my Backend REST API app returns message:
    
    [html]
    <!DOCTYPE html>
    <html lang=en>
    <head>
        <meta charset=utf-8>
        <meta http-equiv=X-UA-Compatible content="IE=edge">
        <meta name=viewport content="width=device-width,initial-scale=1">
        <link rel=icon href=/images/favicon.ico>
        <title id=app_title>V Tasks</title>
        <link href=/css/about.8b7fdd6b.css rel=prefetch>
        <link href=/css/chunk-54032134.53235256.css rel=prefetch>
        <link href=/js/about.10ed4f34.js rel=prefetch>
        <link href=/js/chunk-2d0c7e58.d06a9dfa.js rel=prefetch>
        <link href=/js/chunk-2d0e5060.180cdb07.js rel=prefetch>
        <link href=/js/chunk-2d0e5e97.5e310a93.js rel=prefetch>
        <link href=/js/chunk-396ee539.e39580f6.js rel=prefetch>
        <link href=/js/chunk-54032134.35996136.js rel=prefetch>
        <link href=/js/chunk-7e2da331.e5adb838.js rel=prefetch>
        <link href=/js/chunk-8bcf2014.e2eb781b.js rel=prefetch>
        <link href=/js/chunk-eda59d9a.5e7ed3f8.js rel=prefetch>
        <link href=/css/app.355f43b3.css rel=preload as=style>
        <link href=/css/chunk-vendors.377ce48f.css rel=preload as=style>
        <link href=/js/app.9d2d5593.js rel=preload as=script>
        <link href=/js/chunk-vendors.7429debf.js rel=preload as=script>
        <link href=/css/chunk-vendors.377ce48f.css rel=stylesheet>
        <link href=/css/app.355f43b3.css rel=stylesheet>
    </head>
    <body>
    <noscript><strong>We're sorry but vtasks doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript>
    <div id=app></div>
    <script src=/js/chunk-vendors.7429debf.js></script>
    <script src=/js/app.9d2d5593.js></script>
    </body>
    </html>
    
    HTML:

    That is not issue of my browsers. I tested several: tghe same returns.
    My local vervion (apache hostings) works ok

    What could cause this error and how to fix it?
    SEMrush
    Thanks![/html]
     
    Last edited: Dec 15, 2019
    mstdmstd, Dec 15, 2019 IP
    SEMrush
  2. mmerlinn

    mmerlinn Prominent Member

    Messages:
    2,576
    Likes Received:
    508
    Best Answers:
    6
    Trophy Points:
    320
    #2
    Your code would be a LOT easier to read and understand if you had not put it ALL ON ONE LINE.
     
    mmerlinn, Dec 15, 2019 IP
  3. mstdmstd

    mstdmstd Active Member

    Messages:
    95
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #3
    Fixed.
    Could you please run my app in your browser : vtasks.my-demo-apps.tk Also ps check in console request to server
     
    mstdmstd, Dec 15, 2019 IP
  4. mstdmstd

    mstdmstd Active Member

    Messages:
    95
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #4
    As that is Laravel 5.8 Backend REST API app I removed welcome route in routes/web.php file
    and tried to run app root at
    http://vtasks-backend.my-demo-apps.tk/
    and works ok

    But in console of my app I see error : https://imgur.com/a/aMXqAwN
    Could ypou please try from your side? What do you see?

    It worked yesterday without any problems, but today I see these errors and I do not see why and how to fix it...
    I did not modfify any configurations...
    On this server there are several my app and now they all works ok.
     
    mstdmstd, Dec 16, 2019 IP
  5. JEET

    JEET Notable Member

    Messages:
    3,377
    Likes Received:
    376
    Best Answers:
    16
    Trophy Points:
    235
    #5
    We cannot say what is wrong without seeing the code, but it sure looks like as if you are missing some call parameter, which is why the server is returning a HTML page instead of API data like servers normally do...
     
    JEET, Dec 16, 2019 IP
  6. mstdmstd

    mstdmstd Active Member

    Messages:
    95
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #6
    Sorry, very stuped of me, I set rest api server my client app root
     
    mstdmstd, Dec 16, 2019 IP
    JEET likes this.
  7. Spoiltdiva

    Spoiltdiva Illustrious Member

    Messages:
    7,011
    Likes Received:
    2,433
    Best Answers:
    51
    Trophy Points:
    470
    #7
    I'm not trying to make you look "stuped", but it's spelled "stupid".;)
     
    Spoiltdiva, Dec 16, 2019 IP
    JEET likes this.