ERR_ADDRESS_UNREACHABLE to opening my localhost in Chrome Android

Funny Frontend picture Funny Frontend · Aug 4, 2015 · Viewed 24k times · Source

I´m using the task BrowserSync of Grunt, this task launch my local project to the url "localhost:3000".

enter image description here

This works fine. But when I use the External url (http://192.168.1.129:3000) in my smartphone, I get the following error of my browser Chrome in Android:

ERR_ADDRESS_UNREACHABLE

I don't understand this problem. You can see here my Gruntfile.js:

//Gruntfile.js
module.exports = function (grunt) {
  grunt.initConfig({

    //Watch task config
    watch: {

    },
    //BrowserSync
    browserSync: {
      default_options: {
        bsFiles: {
          src: [
            "css/*.css",
            "js/*.js",
            "*.html"
          ]
        },
        options: {
          watchTask: true,
          proxy: "tutorialmaterialize.dev"
          }
        }
      }

    });

  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-browser-sync');

 //Default task
 grunt.registerTask('default', ['browserSync', 'watch']);
};

how can i fix this?, thanks you very much.

Answer

danday74 picture danday74 · Mar 29, 2017

your IP starts with 192.168 which means this is a private network.

Only devices on the private network can access it.

Your phone will need to be on the same network.

You can check this by checking the first 3 digits of your phone's IP - the first 3 digits must be the same - if they begin 192.168.1.NUMBER then its on the same network. If not then its on a different network and you need to get them on the same network.

If they are already on the same network then ensure that port 3000 is open on the firewall, both the router firewall AND the firewall running on the machine you are accessing.