Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response from the ota server is not parsable JSON #1176

Open
michielbdejong opened this issue Sep 18, 2024 · 4 comments
Open

Response from the ota server is not parsable JSON #1176

michielbdejong opened this issue Sep 18, 2024 · 4 comments

Comments

@michielbdejong
Copy link
Member

For example, from example.com:

"{"fetch": "http://example.com\",\"select\": \a"body"}"<h1 id=\"exampledomain\">Example Domain\n

This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.

\n

<a href=\"https://www.iana.org/domains/example\\\">More information\xE2\x80\xA6

""

@michielbdejong
Copy link
Member Author

There are two res.write statements in server-common.mjs - line 24 and line 36.
You can:

  • remove the top one, commit that, push to github,
  • ssh [email protected], su crawler, screen -r, Crtr-C, git pull, ./prod.sh, Ctrl-A Ctrl-D

@madoleary
Copy link
Contributor

madoleary commented Sep 18, 2024

I'm confused about how this works. Was I to push the removal of the redundant first res.write to the branch tosdr-production? I pushed to main, and my changes aren't reflected in the git pull. Is the image rebuild factored into this workflow?

@madoleary
Copy link
Contributor

And what is the correct port for the server? In the code, it says 443. In the prod.sh script, it says 4430.

@michielbdejong
Copy link
Member Author

Was I to push the removal of the redundant first res.write to the branch tosdr-production? I pushed to main, and my changes aren't reflected in the git pull.

You can easily check this as follows:

root@ota:~# su crawler
crawler@ota:/root$ screen -r
There is no screen to be resumed.
crawler@ota:/root$ screen -ls
No Sockets found in /run/screen/S-crawler.

crawler@ota:/root$ cd
crawler@ota:~$ cd engine/
crawler@ota:~/engine$ git status
On branch tosdr-production
Your branch is up to date with 'origin/tosdr-production'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	declarations
	prod.sh

nothing added to commit but untracked files present (use "git add" to track)
crawler@ota:~/engine$ 

Is the image rebuild factored into this workflow?

no

And what is the correct port for the server? In the code, it says 443. In the prod.sh script, it says 4430.

4430 is correct, since this script runs as crawler without sudo. Sorry, I think I had that as an uncommitted change on the server, fixed now.

michielbdejong added a commit to tosdr/ota-engine that referenced this issue Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants