mean-expert-official / fireloop-todo-example

This is an example of a todo application built in FireLoop
13 stars 8 forks source link

Failed to load resource: net::ERR_ADDRESS_INVALID #7

Closed alex46300 closed 7 years ago

alex46300 commented 7 years ago

Hi,

Thank you for your good work !

I tried to launch locally the todo example but I meet this error and I don't know how to solve it:

Failed to load resource: net::ERR_ADDRESS_INVALID GET http://0.0.0.0:3000/socket.io/?EIO=3&transport=polling&t=LaXQmE4 net::ERR_ADDRESS_INVALID zone.js:1382

I already see http://mean.expert/2016/10/10/angular-2-real-time-applications/ and try to replace 0.0.0.0 to localhost and add app.emit('started', server); but it does not work.

Could you please help me ?

Thanks a lot

jonathan-casarrubias commented 7 years ago

Try http://127.0.0.1

alex46300 commented 7 years ago

I modify only in lb.config.ts but I have connection refused.

Failed to load resource: net::ERR_CONNECTION_REFUSED http://127.0.0.1:3000/socket.io/?EIO=3&transport=polling&t=LaXf2

I saw there is "host": "0.0.0.0" in config.json (server part). Should I modify too ?

jonathan-casarrubias commented 7 years ago

Well not really, this modification is usually only needed in the front-end if you are able to see the explorer http://127.0.0.1:3000/explorer then it is possible that the real-time component is not running. But you can always try. TIP: also whatever config you set in the backend, will be generated in the front-end when you create the SDK.

You can make sure the real-time component is running by enabling the debug mode

server/component-config.json

{
  "loopback-component-explorer": {
    "mountPath": "/explorer"
  },
  "@mean-expert/loopback-component-realtime": {
    "auth": false,
    "debug": true
  }
}

and you should see something like:

@mean-expert/loopback-component-realtime: RTC authentication mechanism enabled
@mean-expert/loopback-component-realtime: PubSub server enabled using socket.io driver.
@mean-expert/loopback-component-realtime: IO server enabled using socket.io driver.
@mean-expert/loopback-component-realtime: FireLoop server enabled using socket.io driver.
@mean-expert/loopback-component-realtime: WebRTCSignaler server enabled using socket.io driver.
Web server listening at: http://0.0.0.0:3000
Browse your REST API at http://0.0.0.0:3000/explorer

Also, if you open the following link what is the result?

a ) It downloads a file with handshake information b ) It does return a not found page 404

alex46300 commented 7 years ago

With the debug true, I don't see log anywhere and when I click on the link the connectin is ERR_CONNECTION_REFUSED (with 127.0.0.1)

serve

connectionrefused

I think loopback is not running because http://localhost:3000/explorer is not accessible.

jonathan-casarrubias commented 7 years ago

That is what it seems, it looks like only the angular part is being served.

There has been several changes in the core of the sdk and the realt-time, actually just yesterday I released the RC 6 for the SDK Builder, and I think there are a couple of things that could led to the generator to fail.

I will check and see what needs to be adjusted and release a fix for this asap.

Cheers Jon

alex46300 commented 7 years ago

Ok thank you. I'm waiting about you :)

jonathan-casarrubias commented 7 years ago

@alex46300 I have published the beta 1 version, which includes some breaking changes..

I will update this repo, everything is much more stable now, just make sure you select both applications with the space tab when Yeoman display the applications.

Cheers Jon

jonathan-casarrubias commented 7 years ago

Hi @alex46300 everything has been updated and now it is working, please make sure you update your fireloop version and then clone the project from scratch.

Cheers Jon

alex46300 commented 7 years ago

Hi @jonathan-casarrubias,

Sorry, I cloned the project from scratch but I always have the same problem.

jonathan-casarrubias commented 7 years ago

Hey @alex46300 I believe you are not selecting both applications with the space key, it seems to me that you are only selecting the webapp

alex46300 commented 7 years ago

Effectively, you're right ! it works ! thank you !

I was thinking server and webapp were launched together when webApp is selected.

Nice job ! :)

jonathan-casarrubias commented 7 years ago

Cool I'm glad it does work for you now..

Cheers!!