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.

Unhandled: Unexpected token ...

See original GitHub issue

Our pipeline updated to version 3.1.13 and we’ve been unable to get a successful build. The UnityBuildTask@3 is failing with an Unexpected token error:

2022-06-17T20:44:18.9621068Z ##[section]Starting: Build Unity project
2022-06-17T20:44:18.9703341Z ==============================================================================
2022-06-17T20:44:18.9703571Z Task         : Unity Build
2022-06-17T20:44:18.9703785Z Description  : Build a Unity project and get the exported output files.
2022-06-17T20:44:18.9703985Z Version      : 3.1.13
2022-06-17T20:44:18.9704140Z Author       : Dinomite Studios
2022-06-17T20:44:18.9704484Z Help         : Use this task to build your Unity project and generate the target platform's output files. [More Information](https://unitydevops.com/docs/unity-build-task)
2022-06-17T20:44:18.9705025Z ==============================================================================
2022-06-17T20:44:18.9874074Z ##[debug]Using node path: C:\vss-agent\2.204.0\externals\node\bin\node.exe
2022-06-17T20:44:19.1506772Z ##[debug]agent.TempDirectory=D:\a\_work\_temp
2022-06-17T20:44:19.1520606Z ##[debug]loading inputs and endpoints
2022-06-17T20:44:19.1525188Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2022-06-17T20:44:19.1557191Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2022-06-17T20:44:19.1559575Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2022-06-17T20:44:19.1563514Z ##[debug]loading INPUT_BUILDSCRIPTTYPE
2022-06-17T20:44:19.1564688Z ##[debug]loading INPUT_BUILDTARGET
2022-06-17T20:44:19.1565839Z ##[debug]loading INPUT_INLINEBUILDSCRIPT
2022-06-17T20:44:19.1567062Z ##[debug]loading INPUT_OUTPUTFILENAME
2022-06-17T20:44:19.1568086Z ##[debug]loading INPUT_OUTPUTPATH
2022-06-17T20:44:19.1569139Z ##[debug]loading INPUT_UNITYEDITORSPATHMODE
2022-06-17T20:44:19.1570109Z ##[debug]loading INPUT_UNITYPROJECTPATH
2022-06-17T20:44:19.1573240Z ##[debug]loading SECRET_BUILDAGENTACCESSTOEDTPACKAGING
2022-06-17T20:44:19.1575823Z ##[debug]loading SECRET_EDTVSTSACCESS
2022-06-17T20:44:19.1577146Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2022-06-17T20:44:19.1580958Z ##[debug]loaded 13
2022-06-17T20:44:19.1595000Z ##[debug]Agent.ProxyUrl=undefined
2022-06-17T20:44:19.1596065Z ##[debug]Agent.CAInfo=undefined
2022-06-17T20:44:19.1596431Z ##[debug]Agent.ClientCert=undefined
2022-06-17T20:44:19.1596805Z ##[debug]Agent.SkipCertValidation=undefined
2022-06-17T20:44:19.1636737Z ##[debug]task result: Failed
2022-06-17T20:44:19.1659639Z ##[error]Unhandled: Unexpected token ...
2022-06-17T20:44:19.1664986Z ##[debug]Processed: ##vso[task.issue type=error;]Unhandled: Unexpected token ...
2022-06-17T20:44:19.1666146Z ##[debug]Processed: ##vso[task.complete result=Failed;]Unhandled: Unexpected token ...
2022-06-17T20:44:19.1684995Z ##[section]Finishing: Build Unity project

Let me know if you need more details.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
FejZacommented, Jun 21, 2022

@Kostusev yes!

3reactions
FejZacommented, Jun 23, 2022

Fixed in v2.9.0 of the extension package.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: Unexpected token - JavaScript - MDN Web Docs
The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided.
Read more >
Have a JavaScript Unexpected Token Error? Check Your Syntax
A deep look at the Unexpected Token Error in JavaScript, including a short examination of JavaScript's syntax best practices.
Read more >
SyntaxError: Unexpected token in JavaScript | bobbyhadz
The "Uncaught SyntaxError: Unexpected token" occurs for multiple reasons: · The error is also caused if you're making an HTTP request to a...
Read more >
JavaScript Error Handling: Unexpected Token - GeeksforGeeks
An unexpected token occurs if JavaScript code has a missing or extra character { like, ) + – var if-else var etc}. Unexpected...
Read more >
syntax error: unexpected token - javascript - Stack Overflow
The error SyntaxError: Unexpected token < likely means the API endpoint didn't return JSON in its document body, such as due to a...
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