2

This might be a bug in Google Scripts, or perhaps I am doing something wrong. If I include a country suffix com.xx in a string variable, it gets replaced with "(class)". Just "com" is fine, but anything after that triggers this.

Here are my two variables

var VarA = 'https://example.com.au/projects.json' ; var VarB = 'https://example.com/projects.json' ;

When I debug this, they behave differently. B is fine, but A gets (class) inserted

VarA string "https://example.(class)/projects.json" VarB string "https://example.com/projects.json"

Update: when I first posted this (13 Nov) this was occurring in all three:

  1. logger
  2. debug
  3. when passed to another function to get that URL

It is now working for logger and when passed to a function. Still occurring in debug mode, but I am guessing this was a bug that was addressed

7
  • 1
    Can you share a minimal reproducible example? Commented Nov 13, 2017 at 5:40
  • This indeed seems to be the case during debugging prntscr.com/h9vyfi Placing the breakpoint after 'VarA' is assigned a value produces this wrong result in the console. However, in my case, it doesn't affect the Logger prntscr.com/h9vzly Could that be a Debugger console parser issue? Commented Nov 13, 2017 at 14:10
  • I've verified that this isn't an issue in the debugger. When I send VarA through to another function, it will fail at run time with an error along the lines of "that isn't a valid URL" (since example.(class)/blah isn't): Request failed for https://example.<?>/projects.json returned code 401. Commented Nov 13, 2017 at 21:29
  • Without an example I can't verify the behavior. What are you trying to do when this replacement occurs? Commented Nov 14, 2017 at 1:38
  • Here is the spreadsheet docs.google.com/a/redant.com.au/spreadsheets/d/e/… Commented Nov 14, 2017 at 22:19

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.