This project is read-only.
1

Closed

Javascript Error: Unexpected token W

description

I think the VSO team has made some updates recently which have impacted the Zendesk/VSO integration. Late last week, I started seeing this error message when I went to associate a ticket with a work item: "Unexpected token W".

Due to recent VSO API changes, it might be more appropriate use personal tokens instead of alternate credentials.

file attachments

Closed Jul 22, 2015 at 10:20 PM by bfcamara
Fixed in version 0.3.1

comments

bfcamara wrote Jul 20, 2015 at 6:06 PM

Hi,

thank you for reporting this. I'm trying to repro the problem but I'm not getting the error you mentioned. What version of the app are you using? Are you using version 0.3?

Regarding the usage of alternate credentials, you're totally right. We need to change the app to start asking for personal tokens instead of alternate credentials.

Thanks in advance

Bruno

jupiterbx wrote Jul 20, 2015 at 7:53 PM

Correct, been using 0.3 version since January. In Chrome, I get the Unexpected Token W error, but in IE 11, it's a bit different. It returns Unterminated string constant.

bfcamara wrote Jul 20, 2015 at 10:53 PM

Is this error happening when you try to link a ticket with an existent work item? If yes, it happens on a specific workitem id or for all work items? Or is it happening when the app is loaded?

I'm wondering if we could chat in Skype to help me diagnose the issue. Could you please send me a private message with your skype id?

Thanks in advance

Bruno

jupiterbx wrote Jul 21, 2015 at 4:58 PM

Bruno, this happens whenever I click on a ticket in Zendesk and the app starts to load on the right-hand side of the screen. I don't even see the buttons to link or create a work item anymore. I'll send you my contact info so we can walk through it. Thanks!

bfcamara wrote Jul 22, 2015 at 10:03 PM

Thank you for reporting this. So, the issue is related to an invalid JSON that we are storing to save the VSO fields settings to determine what fields must be shown to the user in Summary and Details view.

This JSON document is being truncated, apparently due a limit in what a Zendesk setting can store. This is resulting in an invalid setting that the app is not handling correctly.

I'm fixing this by 1) reduce significantly the size of the JSON and 2) by handling gracefully an invalid JSON (just in case) applying the default settings.

I'll publish a new release as soon as I have the fix