sitespeedio / onlinetest

Deploy your own version of sitespeed.io online.
GNU Affero General Public License v3.0
9 stars 5 forks source link

adding defaultSitespeedioConfigFile file is giving error as "Found. Redirecting to" once test finishes #74

Open Ankit3794 opened 2 months ago

Ankit3794 commented 2 months ago

added defaultSitespeedioConfigFile config path in server/config/default.yaml

config.json file

{
  "html": {
    "homeurl": "http://localhost:3000"
  }
}

Expected once test finishes it will redirect to result page, where If I click on header logo, It should redirect me back to onlinetest UI.

Actual Result Once the test finishes it is redirecting to http://localhost:3000/result/<UUID> Url but it is not opening page but throwin error as Found. Redirecting to image

Even on the search tab, URL is not clickable, even though result is completed. (First two run)

image

Note - This behaviour is happening with any configuration parameter added in defaultSitespeedioConfigFile file.

soulgalore commented 2 months ago

Hi @Ankit3794 thanks for creating the issue. So it's three different issues right?

  1. One is that it seems like configuration on the server isn't propagated to the the actual test (the link for the header)
  2. The result isn't redirected
  3. The result page in search isn't linked.

What OS do you use and how do you run (do you use Docker or NodeJS)?

Ankit3794 commented 2 months ago

Hi @soulgalore,

I am running on Ubuntu 22.04. Server and Test Runner both are running directly with NodeJS, where as TestRunner will be starting Docker Container to run actual test.

Yes correct, kind of three issues

  1. defaultConfig given in server/default.yaml is not being carry forwarded
  2. Result is not being redirected
  3. Result page in search is not linked.

But all these issues are only happening if defaultConfig is given in server/default.yaml file. If defaultConfig is not given 2nd and 3rd issue is not happening.

soulgalore commented 2 months ago

That is strange, I have a setup where I run on Ubuntu where all the three things work, however they run on two separate servers so I don't use localhost. And you don't get any errors in your logs? I'll check later this weekend and see if I understand what's going on.

Ankit3794 commented 2 months ago

@soulgalore , Debugged the issue over the weekend and seen that once the add-test is done on result.get('/:id') navigation job.status is completed but job.returnvalue.pageSummaryUrl is empty

https://github.com/sitespeedio/onlinetest/blob/822e97a3887f2640263c0b6b1851b722c682e415/server/src/routes/html/result.js#L20

soulgalore commented 2 months ago

Thanks for looking into it. In the logs of the testrunner, do you get a log that says something like Find the result at followed by a URL? In your sitespeed.json file do you have setup for the result URL, something like:

{
 "resultBaseURL": "http://127.0.0.1:9000/sitespeedio"
}
soulgalore commented 2 months ago

defaultConfig given in server/default.yaml is not being carry forwarded

I'm working on this, hope to have some clue about it tomorrow.

soulgalore commented 2 months ago

Hmm, for me setting the default config both on the server and testrunner like this works:

{
  "html": {
    "homeurl": "http://localhost:3000"
  }
}

However setting some Chrome args on the test runners default file fails for me, so there's some bug/unexpected behaviour going on here.

Ankit3794 commented 2 months ago

Thanks for looking into it. In the logs of the testrunner, do you get a log that says something like Find the result at followed by a URL? In your sitespeed.json file do you have setup for the result URL, something like:

{
 "resultBaseURL": "http://127.0.0.1:9000/sitespeedio"
}

Yes, in sitespeed.json file I have resultBaseURL setup available.

I am not seeing any logs on testrunner stating Find the result at

image