vechain / thor-sync.electron

A browser that empowers DApps on VeChain
GNU Lesser General Public License v3.0
55 stars 28 forks source link

Can't open any react based app in sync 1 #512

Closed haseeb5i closed 2 years ago

haseeb5i commented 2 years ago

Describe the bug I have a dapp written in react that is connected to vechain using connex. I want the users to connect their wallet so that they can use our services (website is not complete yet). I could not open any react app in sync 1 and i couldn't find any other issue on this repo regarding this.

To Reproduce Steps to reproduce the behavior:

  1. Open Sync 1 wallet and go to 'https://exoworlds.io/
  2. The page loads but shows no content of the website.

Actual result: No website shown after going to the url and loading the page. The website is loaded for a moment but then white page apperas with no content.

Expected result: Home page of exoworlds should have been displayed with information about the project (open url in regular browser to see actual page)

Desktop OS : Win10

Sync Version: sync v.1.3.1

haseeb5i commented 2 years ago

Issue have been resolved. It was due to undefined value for globalThis in sync 1 browser, which is a standard way to access global object in modern browsers. So, if someone else faces this issue, try defining this in your app code window.globalThis = window.

AsbertMa commented 2 years ago

Issue have been resolved. It was due to undefined value for globalThis in sync 1 browser, which is a standard way to access global object in modern browsers. So, if someone else faces this issue, try defining this in your app code window.globalThis = window.

You'd better check it first. @xCodeR01 window.globalThis ? '' : window.globalThis = window or window.connex && (window.globalThis = window)