question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple issues with JavaScript disabled (befault in onion browsers)

See original GitHub issue

Describe the bug There are several problems with JavaScript disabled:

  • Crowdfunding appears inactive even when it is active (appears active on JS-enabled websites)
  • Redirect to noscript invoice is missing rootPath, therefore leads to 404 when rootPath is set to e.g. /btcpay
  • When rootPath is inserted manually, all the links on that site have rootPath missing as well (payment methods as well as Go back to Javascript enabled invoice)

Note that rootPath works correctly everywhere else as far as I can tell.

To Reproduce Steps to reproduce the behavior:

  1. Setup BTCPay with onion, rootPath = /btcpay
  2. Setup a crowdfunding app and activate it
  3. Setup a POS app
  4. Copy the address of crowdfunding app to onion browser with JS disabled
  5. See crowdfunding being inactive
  6. Visit the address of POS app in the onion browser
  7. Try to buy something
  8. Click “Continue to javascript-disabled invoice” on the next page
  9. See Error 404
  10. Insert /btcpay manually
  11. Inspect links on the site

Expected behavior Crowdfunding should appear active when JS is disabled. The links in invoice site should contain the rootPath (/btcpay in this example)

Your BTCPay Environment (please complete the following information):

  • BTCPay Server Version: 1.0.5.9
  • Deployment Method: Debian package
  • Browser: Torbrowser - same behavior on Android and Linux desktop

Logs (if applicable)

Logs, don't seem to contain anything interesting
Nov 07 22:28:05 <redacted> systemd[1]: Started A cross platform, self-hosted server compatible with Bitpay API.
Nov 07 22:28:06 <redacted> btcpayserver[1658]: info: Configuration:  Data Directory: /var/lib/btcpayserver-system-mainnet/.btcpayserver/Main
Nov 07 22:28:06 <redacted> btcpayserver[1658]: info: Configuration:  Configuration File: /etc/btcpayserver-system-mainnet/btcpayserver.conf
Nov 07 22:28:06 <redacted> btcpayserver[1658]: info: Configuration:  Network: Mainnet
Nov 07 22:28:06 <redacted> btcpayserver[1658]: info: Configuration:  Supported chains: BTC
Nov 07 22:28:06 <redacted> btcpayserver[1658]: info: Configuration:  LogFile: /var/log/btcpayserver-system-mainnet/debug.log
Nov 07 22:28:06 <redacted> btcpayserver[1658]: info: Configuration:  Log Level: Debug
Nov 07 22:28:07 <redacted> btcpayserver[1658]: info: Configuration:  Network: Mainnet
Nov 07 22:28:07 <redacted> btcpayserver[1658]: info: Configuration:  Supported chains: BTC
Nov 07 22:28:07 <redacted> btcpayserver[1658]: info: Configuration:  LogFile: /var/log/btcpayserver-system-mainnet/debug.log
Nov 07 22:28:07 <redacted> btcpayserver[1658]: info: Configuration:  Log Level: Debug
Nov 07 22:28:07 <redacted> btcpayserver[1658]: info: Configuration:  Postgres DB used
Nov 07 22:28:10 <redacted> btcpayserver[1658]: info: Configuration:  Root Path: /btcpay
Nov 07 22:28:11 <redacted> btcpayserver[1658]: info: Configuration:  BTC: Explorer url is http://127.0.0.1:24445/
Nov 07 22:28:11 <redacted> btcpayserver[1658]: info: Configuration:  BTC: Cookie file is /var/lib/nbxplorer-mainnet/Main/.cookie
Nov 07 22:28:11 <redacted> btcpayserver[1658]: info: PayServer:      Starting listening NBXplorer (BTC)
Nov 07 22:28:11 <redacted> btcpayserver[1658]: info: Events:         NBXplorer BTC: NotConnected => Ready
Nov 07 22:28:11 <redacted> btcpayserver[1658]: info: PayServer:      Start watching invoices
Nov 07 22:28:11 <redacted> btcpayserver[1658]: info: PayServer:      BTC: Checking if any pending invoice got paid while offline...
Nov 07 22:28:11 <redacted> btcpayserver[1658]: info: PayServer:      BTC: 0 payments happened while offline
Nov 07 22:28:11 <redacted> btcpayserver[1658]: info: PayServer:      Connected to WebSocket of NBXplorer (BTC)
Nov 07 22:28:11 <redacted> btcpayserver[1658]: info: PayServer:      Starting payment request expiration watcher
Nov 07 22:28:12 <redacted> btcpayserver[1658]: info: Configuration:  Listening on http://127.0.0.1:23000
Nov 07 22:28:12 <redacted> btcpayserver[1658]: info: PayServer:      0 pending payment requests being checked since last run
Nov 07 22:28:55 <redacted> btcpayserver[1658]: info: PayServer:      User logged in.
Nov 07 22:37:45 <redacted> btcpayserver[1658]: info: Events:         BTC: New block
Nov 07 22:48:11 <redacted> btcpayserver[1658]: info: Events:         BTC: New block
Nov 07 22:55:45 <redacted> btcpayserver[1658]: info: Events:         Invoice PmZf31pDidAYQdyjzpnzTr new event: invoice_created (1001)
Nov 07 22:55:45 <redacted> btcpayserver[1658]: info: Events:         BTCPayServer.HostedServices.AppInventoryUpdaterHostedService+UpdateAppInventory
Nov 07 23:02:48 <redacted> btcpayserver[1658]: info: Events:         Invoice CWRuT6qbigJaR28tfCqgFA new event: invoice_created (1001)
Nov 07 23:02:48 <redacted> btcpayserver[1658]: info: Events:         BTCPayServer.HostedServices.AppInventoryUpdaterHostedService+UpdateAppInventory
Nov 07 23:07:23 <redacted> btcpayserver[1658]: info: Events:         BTC: New block
Nov 07 23:10:05 <redacted> btcpayserver[1658]: info: Events:         Invoice 9QmQHQqEzXFAHYokVzbkA6 new event: invoice_created (1001)
Nov 07 23:10:05 <redacted> btcpayserver[1658]: info: Events:         BTCPayServer.HostedServices.AppInventoryUpdaterHostedService+UpdateAppInventory
Nov 07 23:12:29 <redacted> btcpayserver[1658]: info: Events:         Invoice NTRXT54n2T1yyWU3Vzk2ph new event: invoice_created (1001)
Nov 07 23:12:29 <redacted> btcpayserver[1658]: info: Events:         BTCPayServer.HostedServices.AppInventoryUpdaterHostedService+UpdateAppInventory
Nov 07 23:12:29 <redacted> btcpayserver[1658]: info: PayServer:      BTC (Lightning): Start listening http://127.0.0.1:8080/
Nov 07 23:14:27 <redacted> btcpayserver[1658]: info: Events:         BTC: New block
Nov 07 23:19:03 <redacted> btcpayserver[1658]: info: Events:         BTC: New block
Nov 07 23:19:06 <redacted> btcpayserver[1658]: info: Events:         BTC: New block

Additional context

Config file
btc.explorer.cookiefile=/var/lib/nbxplorer-mainnet/Main/.cookie

btc.explorer.url=http://127.0.0.1:24445/

debuglog=/var/log/btcpayserver-system-mainnet/debug.log

port=23000
btc.lightning=type=eclair;server=http://127.0.0.1:8080/;password=XXXXXX

rootPath=/btcpay
postgres=User ID=btcpayserversystemmainnet;Password=XXXXXX;Host=localhost;Port=;Database=btcpayserversystemmainnet;

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bolatovumarcommented, Nov 11, 2020

Thanks for working on this so quickly!

@bolatovumar the JS version works as expected, non-JS doesn’t so apparently it should be the same as JS version. 😃

Any ETA when the release with fixes will be released?

Not sure about the ETA. I guess the URL update for root path should be in the next release.

0reactions
Kixunilcommented, Nov 8, 2020

Thanks for working on this so quickly!

@bolatovumar the JS version works as expected, non-JS doesn’t so apparently it should be the same as JS version. 😃

Any ETA when the release with fixes will be released?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is Javascript enabled by default if it's so dangerous?
Onion services with no javascript" I find that argument lame, cause the vast majority of Tor users do not use hidden services, period, ......
Read more >
Why does Tor Browser ship with JavaScript enabled?
We configure NoScript to allow JavaScript by default in Tor Browser because many websites will not work with JavaScript disabled.
Read more >
Why is JavaScript disabled in the Tor Browser Bundle?
Short answer: JavaScript isn't a threat per se, but it can become one. So disable it in critical situations just in case.
Read more >
How To Disable Javascript In Tor
After installing the Tor browser, open the Settings menu. Under the Security section, click the Enable JavaScript button. This will disable ...
Read more >
Disabling JavaScript In Tor: A Non-Techie's Guide
Learn how to disable JavaScript in Tor browser for enhanced privacy and anonymity. Find out the steps, advantages, and risks involved.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found