Hi all,
I’m running app tests and while my tests are passing, I’m getting the following, constantly:
...
I20241126-21:05:06.576(1)? [ERROR] https://undefined/sockjs/info?t=1732651506411 - Failed to load
resource: net::ERR_NAME_NOT_RESOLVED
I20241126-21:05:06.576(1)? [ERROR] https://undefined/sockjs/info?t=1732651506411 - Failed to load
resource: net::ERR_NAME_NOT_RESOLVED
I20241126-21:05:06.576(1)? [ERROR] https://undefined/sockjs/info?t=1732651506411 - Failed to load
resource: net::ERR_NAME_NOT_RESOLVED
...
What’s with the undefined
host?
My app does not use localhost
for dev or tests. Rather, I have a mapping for hostnames in /etc/hosts
:
127.0.0.1 www.dev-test.com
127.0.0.1 www.dev-app.com
So for client tests to work, I need to set ROOT_URL
. But what do I need to do to fix the sockjs/info
error?
My command test run client tests:
TEST_BROWSER_DRIVER=chrome
TEST_CHROME_ARGS='--headless --no-sandbox --ignore-certificate-errors'
TEST_SERVER=0
SERVER_NODE_OPTIONS='--trace-uncaught --trace-warnings'
ROOT_URL=https://www.dev-test.com:3000
meteor test
--port 3006
--extra-packages xolvio:cleaner meteortesting:mocha@3.2.0 meteortesting:browser-tests@1.7.0 meteortesting:mocha-core@8.2.0
--driver-package meteortesting:mocha
--settings .app-settings/test.json
--full-app
Thanks a lot.