All build failed with an empty project (or any other projects)

Hi Cocos Dev Team,

Update : We found services.json causes this issue. It’s invalid JSON format.

{
“services”: [
{
“service_id”: “235”,
“service_name”: “Cocos Analytics”,
“service_icon”: “https://account.cocos.com/client/3f8f31ccf66995e183044f167c092395.png”,
“service_desc”: “Provides core and basic data,
simple and easy to use standardized interface features,
best-accurated data”,
“service_title”: “Accurate understanding of the game’s new,
active,
retained,
paid and other data”,
“service_guide_url”: “https://n-analytics.cocos.com/docs/”,
“service_sample_url”: “https://github.com/cocos-creator/tutorial-dark-slash/tree/analytics”,
“service_dev_url”: “http://analytics.cocos.com/realtime/jump_to/<app_id>”,
“service_type”: “3”,
“service_type_zh”: “公司和个人游戏”,
“support_platform”: [
“Android”,
“iOS”,
“HTML5”
],
“package_download_url”: “https://download.cocos.com/CocosServices/plugins/service-analytics/1.2.0_2.1.0.zip”,
“package_version_desc”: “”,
“service_component_name”: “service-analytics”,
“package_versions”: [
“1.2.1_2.1.0”,
“1.2.0_2.1.0”,
“1.1.7_2.0.3”,
“1.1.6_2.0.1_2.0.2”,
“1.1.5_2.0.1”,
“1.1.4_2.0.1”,
“1.1.3_2.0.1”,
“1.1.2_2.0.0”,
“1.0.0_1.0.5”
],
“build_platform”: [
],
“require_verify”: 0,
“service_price”: “”,
“service_protocol”: "Game for the first time to open the service,the Cocos after notification service for game on service and initialization parameters,service party may according to need to get your Cocos account information,such as account basic information,game basic information,account balance,click on the confirm open button that is seen as you agree to the service to access your account information,See Cocos user service agreement and Cocos privacy policy "
},
{
“service_id”: “241”,
“service_name”: “Matchvs”,
“service_icon”: “https://account.cocos.com/client/14406719a07eb3d714d36e5edc6e06fa.png”,
“service_desc”: “The SDK access to quickly achieve networking functions,
frame synchronization,
domestic and foreign multi-node,
server independent deployment,
game server custom logic”,
“service_title”: “专业成熟的移动游戏联网与服务端解决方案”,
“service_guide_url”: “http://doc.matchvs.com/QuickStart/QuickStart-CocosCreator”,
“service_sample_url”: “http://www.matchvs.com/serviceCourse”,
“service_dev_url”: “http://www.matchvs.com/cocosLogin”,
“service_type”: “3”,
“service_type_zh”: “公司和个人游戏”,
“support_platform”: [
“Android”,
“iOS”,
“HTML5”
],
“package_download_url”: “https://download.cocos.com/CocosServices/plugins/service-matchvs/1.0.9_3.7.9.9.zip”,
“package_version_desc”: “”,
“service_component_name”: “service-matchvs”,
“package_versions”: [
“1.0.9_3.7.9.9”,
“1.0.7_3.7.9.6”,
“1.0.6_3.7.9.2”,
“1.0.5_3.7.7.3”,
“1.0.3_3.7.6.4”
],
“build_platform”: [
],
“require_verify”: 0,
“service_price”: “The service according to usage billing, billing rules ,the fees incurred by the third party from your Cocos balances .”,
“service_protocol”: "Game for the first time to open the service,service party may according to need to get your Cocos account information,click on the confirm open button that is seen as you agree to the service to access your account information,See Cocos user service agreement and Cocos privacy policy "
},
{
“service_id”: “242”,
“service_name”: “Agora Voice”,
“service_icon”: “https://account.cocos.com/uploads/client_icon/2019-07-16/273952d155b4cdb72d2b1bc61de91ade.png”,
“service_desc”: “Build the future of communications with the world’s leading voice、video、and interactive broadcasting platform. Agora delivers easy to embed Real-Time Engagement APIs which includes all the development tools and cloud infrastructure needed for mobile、web、and desktop applications.\n”,
“service_title”: “SDKBuilt-in real-time Audio SDK”,
“service_guide_url”: “https://docs.agora.io/en/Interactive Gaming/game_c?platform=Cocos Creator”,
“service_sample_url”: “https://github.com/AgoraIO/Voice-Call-for-Mobile-Gaming/tree/master/Basic-Voice-Call-for-Gaming/Hello-CocosCreator-Voice-Agora”,
“service_dev_url”: “https://sso.agora.io/api/oauth/cocos/login”,
“service_type”: “3”,
“service_type_zh”: “公司和个人游戏”,
“support_platform”: [
“Android”,
“iOS”,
“HTML5”
],
“package_download_url”: “https://download.cocos.com/CocosServices/plugins/service-agora/1.0.2_2.2.3.20_2.5.2.zip”,
“package_version_desc”: “”,
“service_component_name”: “service-agora”,
“package_versions”: [
“1.0.2_2.2.3.20_2.5.2”,
“1.0.1_2.2.3.20_2.5.2”
],
“build_platform”: [
],
“require_verify”: 1,
“service_price”: “The service according to usage billing, billing rules ,the fees incurred by the third party from your Cocos balances .”,
“service_protocol”: “Game for the first time to open the service,service party may according to need to get your Cocos account information,click on the confirm open button that is seen as you agree to the service to access your account information,See Cocos user service agreement and Cocos privacy policy
}
]
}

I can’t make all build with an empty project (or any other projects) now. This happens after sign-in in Cocos Creator. It seems to be related Cocos service (I guess).

Cocos Creator version : 2.0.9
OS : Mac

Can you look into this issue? It’s a kind of urgent issue. I can’t build my game project for release, either…

Thanks!

belows are editor logs.

2019-09-06T00:50:33.916Z - normal: Load ~/.CocosCreator/settings.json
2019-09-06T00:50:33.957Z - normal: Initializing Asset Database
2019-09-06T00:50:33.959Z - normal: checking language setting…
2019-09-06T00:50:33.959Z - normal: Language: en
2019-09-06T00:50:34.445Z - success: preview server running at http://localhost:7456
2019-09-06T00:50:34.478Z - success: protocol editor-framework registered
2019-09-06T00:50:34.478Z - success: protocol app registered
2019-09-06T00:50:34.479Z - success: protocol theme registered
2019-09-06T00:50:34.479Z - success: protocol packages registered
2019-09-06T00:50:34.479Z - success: protocol uuid registerred
2019-09-06T00:50:34.479Z - success: protocol db registerred
2019-09-06T00:50:34.479Z - success: protocol thumbnail registerred
2019-09-06T00:50:34.479Z - success: protocol unpack registerred
2019-09-06T00:50:34.479Z - success: protocol disable-commonjs registerred
2019-09-06T00:50:35.225Z - normal: connected!
2019-09-06T00:50:35.226Z - normal: Check project /Users/hyuhoonkwon/Documents/cocos2/empty_project
2019-09-06T00:50:35.227Z - normal: Initializing project /Users/hyuhoonkwon/Documents/cocos2/empty_project
2019-09-06T00:50:35.493Z - normal: Initializing Cocos2d
2019-09-06T00:50:36.053Z - normal: Initializing engine extends
2019-09-06T00:50:36.095Z - success: asset-db-debugger loaded
2019-09-06T00:50:36.096Z - success: baidu-adapter loaded
2019-09-06T00:50:36.097Z - success: color-picker loaded
2019-09-06T00:50:36.158Z - success: fb-audience-network loaded
2019-09-06T00:50:36.188Z - success: fb-live-stream loaded
2019-09-06T00:50:36.190Z - success: google-play-instant loaded
2019-09-06T00:50:36.193Z - success: huawei-runtime loaded
2019-09-06T00:50:36.194Z - success: jsb-adapter loaded
2019-09-06T00:50:36.196Z - success: oppo-runtime loaded
2019-09-06T00:50:36.212Z - success: package-manager loaded
2019-09-06T00:50:36.299Z - success: qqplay-adapter loaded
2019-09-06T00:50:36.300Z - success: runtime-dev-tools loaded
2019-09-06T00:50:36.371Z - success: sdkbox loaded
2019-09-06T00:50:36.386Z - success: tester loaded
2019-09-06T00:50:36.402Z - success: ui-grid loaded
2019-09-06T00:50:36.419Z - success: ui-kit-preview-extra loaded
2019-09-06T00:50:36.434Z - success: ui-kit-preview loaded
2019-09-06T00:50:36.450Z - success: ui-kit loaded
2019-09-06T00:50:36.465Z - success: ui-tree loaded
2019-09-06T00:50:36.469Z - success: vivo-runtime loaded
2019-09-06T00:50:36.469Z - success: weapp-adapter loaded
2019-09-06T00:50:36.512Z - success: assets loaded
2019-09-06T00:50:36.527Z - success: builder loaded
2019-09-06T00:50:36.726Z - success: cocos-services loaded
2019-09-06T00:50:36.743Z - success: console loaded
2019-09-06T00:50:36.770Z - success: fb-instant-games loaded
2019-09-06T00:50:36.773Z - success: google-instant-games loaded
2019-09-06T00:50:36.791Z - success: hierarchy loaded
2019-09-06T00:50:36.805Z - success: inspector loaded
2019-09-06T00:50:36.806Z - success: keystore loaded
2019-09-06T00:50:36.820Z - success: node-library loaded
2019-09-06T00:50:36.822Z - success: package-asset loaded
2019-09-06T00:50:36.823Z - success: preferences loaded
2019-09-06T00:50:36.835Z - success: project-exporter loaded
2019-09-06T00:50:36.851Z - success: project-importer loaded
2019-09-06T00:50:36.867Z - success: project-settings loaded
2019-09-06T00:50:36.884Z - success: scene loaded
2019-09-06T00:50:36.885Z - success: simulator-debugger loaded
2019-09-06T00:50:36.887Z - success: sprite-editor loaded
2019-09-06T00:50:36.903Z - success: store loaded
2019-09-06T00:50:36.920Z - success: timeline loaded
2019-09-06T00:50:37.769Z - normal: Loading packages
2019-09-06T00:50:37.774Z - normal: Watching packages
2019-09-06T00:50:37.850Z - normal: Run Application
2019-09-06T00:51:04.897Z - normal: Start building with options : {
“actualPlatform”: “web-mobile”,
“android-instant”: {
“REMOTE_SERVER_ROOT”: “”,
“host”: “”,
“pathPattern”: “”,
“recordPath”: “”,
“scheme”: “https”,
“skipRecord”: false
},
“apiLevel”: “”,
“appABIs”: [],
“appBundle”: false,
“baidugame”: {
“REMOTE_SERVER_ROOT”: “”,
“appid”: “testappid”,
“orientation”: “portrait”,
“subContext”: “”
},
“buildPath”: “/Users/hyuhoonkwon/Documents/cocos2/empty_project/build”,
“debug”: false,
“dest”: “/Users/hyuhoonkwon/Documents/cocos2/empty_project/build/web-mobile”,
“embedWebDebugger”: false,
“encryptJs”: true,
“excludeScenes”: [],
“excludedModules”: [],
“fb-instant-games”: {},
“includeSDKBox”: false,
“inlineSpriteFrames”: true,
“inlineSpriteFrames_native”: true,
“md5Cache”: false,
“mergeStartScene”: false,
“optimizeHotUpdate”: false,
“orientation”: {
“landscapeLeft”: true,
“landscapeRight”: true,
“portrait”: false,
“upsideDown”: false
},
“packageName”: “org.cocos2d.empty_project”,
“platform”: “web-mobile”,
“previewHeight”: “720”,
“previewWidth”: “1280”,
“qqplay”: {
“REMOTE_SERVER_ROOT”: “”,
“orientation”: “portrait”,
“zip”: false
},
“scenes”: [
“aedff8a1-273a-480e-9ebd-18523e6b862d”
],
“sourceMaps”: false,
“startScene”: “aedff8a1-273a-480e-9ebd-18523e6b862d”,
“template”: “link”,
“title”: “empty_project”,
“useDebugKeystore”: true,
“vsVersion”: “auto”,
“webOrientation”: “auto”,
“wechatgame”: {
“REMOTE_SERVER_ROOT”: “”,
“appid”: “wx6ac3f5090a6b99c5”,
“orientation”: “portrait”,
“subContext”: “”
},
“xxteaKey”: “cff0d340-36dd-41”,
“zipCompressJs”: true,
“project”: “/Users/hyuhoonkwon/Documents/cocos2/empty_project”,
“projectName”: “empty_project”,
“debugBuildWorker”: false
}
2019-09-06T00:51:04.899Z - normal: Building /Users/hyuhoonkwon/Documents/cocos2/empty_project
2019-09-06T00:51:04.899Z - normal: Destination /Users/hyuhoonkwon/Documents/cocos2/empty_project/build/web-mobile
2019-09-06T00:51:04.993Z - normal: Delete /Users/hyuhoonkwon/Documents/cocos2/empty_project/build/web-mobile/subpackages//*,/Users/hyuhoonkwon/Documents/cocos2/empty_project/build/web-mobile//*
2019-09-06T00:51:51.044Z - normal: Start building assets
2019-09-06T00:51:51.046Z - normal: Start spawn build-worker
2019-09-06T00:51:51.674Z - normal: Finish spawn build-worker
2019-09-06T00:51:51.674Z - normal: Start init build-worker
2019-09-06T00:51:54.037Z - normal: Finish init build-worker
2019-09-06T00:51:54.037Z - normal: Start build-assets in worker
2019-09-06T00:51:54.146Z - normal: Finish build-assets in worker
2019-09-06T00:51:54.148Z - normal: Finish building assets
2019-09-06T00:51:54.152Z - normal: Start building plugin scripts
2019-09-06T00:51:54.190Z - normal: Generating main.js from /Applications/CocosCreator.app/Contents/Resources/static/build-templates/shares/main.js
2019-09-06T00:51:54.196Z - normal: Generating html from /Applications/CocosCreator.app/Contents/Resources/static/build-templates/web-mobile/template/index.html
2019-09-06T00:51:54.205Z - error: SyntaxError: Unexpected token
in JSON at position 245
at JSON.parse ()
at Object.l [as readJson] (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/cocos-services/panel/utils/utils.js:1:649)
at Object.readEnableService (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/cocos-services/panel/utils/serviceConfig.js:1:662)
at Object.execInstallNativePlatformScript (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/cocos-services/panel/utils/ccServices.js:1:2875)
at s (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/cocos-services/main.js:1:315)
at /Applications/CocosCreator.app/Contents/Resources/app.asar/editor-framework/lib/share/polyfills.js:1:286
at Promise ()
at /Applications/CocosCreator.app/Contents/Resources/app.asar/editor-framework/lib/share/polyfills.js:1:260
at /Applications/CocosCreator.app/Contents/Resources/app.asar/editor/lib/builder/index.js:1:858
at
at then.e (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/lib/builder/index.js:1:885)
at
at process._tickDomainCallback (internal/process/next_tick.js:135:7)
2019-09-06T00:51:54.206Z - error: Build Failed: SyntaxError: Unexpected token
in JSON at position 245
at JSON.parse ()
at Object.l [as readJson] (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/cocos-services/panel/utils/utils.js:1:649)
at Object.readEnableService (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/cocos-services/panel/utils/serviceConfig.js:1:662)
at Object.execInstallNativePlatformScript (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/cocos-services/panel/utils/ccServices.js:1:2875)
at s (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/cocos-services/main.js:1:315)
at /Applications/CocosCreator.app/Contents/Resources/app.asar/editor-framework/lib/share/polyfills.js:1:286
at Promise ()
at /Applications/CocosCreator.app/Contents/Resources/app.asar/editor-framework/lib/share/polyfills.js:1:260
at /Applications/CocosCreator.app/Contents/Resources/app.asar/editor/lib/builder/index.js:1:858
at
at r.waterfall.r (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/lib/builder/index.js:1:3393)
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:52:16
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:696:30
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:167:37
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:1209:30
at Gulp.doneCallback (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/gulp-build.js:1:27675)
at Gulp.Orchestrator.stop (/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/orchestrator/index.js:150:9)
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/orchestrator/index.js:277:22
at finish (/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/orchestrator/lib/runTask.js:21:8)

It seems the installed package has something wrong, remove global config director ~/.CocosCreator and try reinstall the cocos creator.

After a few hours, it seems to be fixed on Cocos Service side. Now services.json is valid and the builds work well.
Thanks for the quick fix!