jneale / Xplore

Xplore: Developer Toolkit for ServiceNow
MIT License
197 stars 147 forks source link

Duplicate tab in Chrome causes JavaObjects to return undefined #53

Closed exevolution closed 2 years ago

exevolution commented 3 years ago

Steps to reproduce:

  1. Open an Xplore tab
  2. Run method that would return [JavaObject] and its properties. gs.getUserID();
  3. Note the results
  4. Right click the tab in Chrome and Duplicate
  5. Repeat step 2
  6. Note the return value is undefined
jneale commented 3 years ago

Hi, I cannot reproduce this issue. What version of ServiceNow, Xplore, and browser are you using?

exevolution commented 3 years ago

ServiceNow version: Quebec Patch 4 Hotfix 2b Xplore version: 4.9 Browser: Chrome 94.0.4606.41 on Windows 10

exevolution commented 3 years ago

Screenshot 2021-09-20 165555 Screenshot 2021-09-20 165615

jneale commented 2 years ago

Turns out this was a bug with Chrome incorrectly copying the page and turning all the settings on which meant hoisting was enabled on the duplicate page. Hoisting requires a return value which is why it was failing.

It's fixed in 4.10.