No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Unable to access localhost on mobile device

    Help
    4
    7
    1706
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hpawar last edited by hpawar

      Unable to access localhost on mobile.

      I am using quasar v1. I am able to access localhost on desktop using http://localhost:8080. But when I try accessing same on a mobile device(for mobile testing) by replacing localhost with my IP address http://xx.xx.xx.xx:8080 it does not work.

      Please note I tried setting the devServer options in package.json with the port as 8080 and host as 0.0.0.0 based on some research

      “devServer”: {
      “contentBase”: “.”,
      “host”: “0.0.0.0”,
      “port”: 8080,
      “public”: “http:192.168.254.14:8080”,
      “disableHostCheck”: true
      }
      Nothing seems to work. Can someone please guide?

      1 Reply Last reply Reply Quote 0
      • lucasfernog
        lucasfernog last edited by

        Do you really need all that configuration? With my projects I can acess the server on mobile without that.

        1 Reply Last reply Reply Quote 0
        • H
          hpawar last edited by

          I am not sure what the problem is. I checked this post https://github.com/vuejs/vue-cli/issues/1616 and some other posts where they mentioned about having devServer config.

          1 Reply Last reply Reply Quote 0
          • Allan-EN-GB
            Allan-EN-GB Admin last edited by

            Make sure you’re on the same network (on wifi).
            Make sure your firewall is off (to test).
            Make sure you’re not using McAffee … If you are, uninstall it, stamp on the installer then burn it with hell fire…

            1 Reply Last reply Reply Quote 0
            • H
              hpawar last edited by

              Unfortunately, none of these seem to be applicable to me. I am on the same network, also switched off the firewall and I just have windows defender; no other antivirus software.

              metalsadman 1 Reply Last reply Reply Quote 0
              • metalsadman
                metalsadman @hpawar last edited by metalsadman

                @hpawar your public url is not a valid url, // missing. I dunno wat your trying here, but dont need those settings to access a pc within the same network, seeing as youve already turned off av and fw, like others said, you should already can access it. Try removing those config.

                1 Reply Last reply Reply Quote 0
                • H
                  hpawar last edited by

                  @metalsadman Thanks. The problem was something else, more to do with the wrong IP I was trying to access localhost on my mobile. My server was listening to a different IP.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post