I am facing this issue while deploying my model. I can not rectify this issue pls help m
WMLClientError: Publishing model failed.
Reason: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Date': 'Tue, 08 Nov 2022 13:04:55 GMT', 'Content-Type': 'application/json', 'Content-Length': '292', 'Connection': 'keep-alive', 'server-timing': 'intid;desc=6f623e2ef5e91f78, intid;desc=6f623e2ef5e91f78', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '766e84679bdde7b3-DFW'})
HTTP response body: {
"trace": "90db2fd42086ff741443abb0c688d8ad",
"errors": [{
"code": "invalid_request_entity",
"message": "Invalid request entity: Unsupported software specification 'default_py3.7'.",
"more_info": "https://cloud.ibm.com/apidocs/machine-learning"
}],
"status_code": "400"
}
I am facing this issue while deploying my model. I can not rectify this issue pls help me
I want to create a short dynamic link via the REST API. My goal is to create a short link with a custom URL suffix.
First, I created an auth token with the following command:
gcloud auth print-access-token
Then, I sent the request:
POST https://firebasedynamiclinks.googleapis.com/v1/managedShortLinks:create
Content-Type: application/json
Authorization: Bearer {{auth_token}}
{
"longDynamicLink": "https://example.com/l/?efr=0&ibi=abc&isi=def&apn=ghi&link=https%3A%2F%2Fexample.com%2Fl%2Fcustom-short-link",
"suffix": {
"customSuffix": "custom-suffix",
"option": "CUSTOM"
}
}
However, I'm getting this response:
HTTP/1.1 403 Forbidden
WWW-Authenticate: Bearer realm="https://accounts.google.com/", error="insufficient_scope", scope="https://www.googleapis.com/auth/firebase"
Vary: Origin, X-Origin, Referer
Content-Type: application/json; charset=UTF-8
Content-Encoding: gzip
Date: Wed, 12 Oct 2022 02:21:07 GMT
Server: ESF
Cache-Control: private
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Connection: close
Transfer-Encoding: chunked
{
"error": {
"code": 403,
"message": "Request had insufficient authentication scopes.",
"status": "PERMISSION_DENIED",
"details": [
{
"#type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
"domain": "googleapis.com",
"metadata": {
"method": "google.firebase.dynamiclinks.v1.DynamicLinksService.CreateManagedShortLink",
"service": "firebasedynamiclinks.googleapis.com"
}
}
]
}
}
I tried using my personal account and service account with the Firebase Dynamic Links Admin role. It is not working. Any ideas?
On firebase cli version 7.11.0 I am getting this error when running firebase serve or firebase deploy.
// terminal error
owner#G700:~/PhpstormProjects/shopify/buyUsedServer$ firebase serve --debug
[2020-01-10T21:56:29.047Z] ----------------------------------------------------------------------
[2020-01-10T21:56:29.060Z] Command: /home/owner/.nvm/versions/node/v10.16.3/bin/node /usr/local/bin/firebase serve --debug
[2020-01-10T21:56:29.061Z] CLI Version: 7.11.0
[2020-01-10T21:56:29.061Z] Platform: linux
[2020-01-10T21:56:29.061Z] Node Version: v10.16.3
[2020-01-10T21:56:29.062Z] Time: Sat Jan 11 2020 04:56:29 GMT+0700 (Indochina Time)
[2020-01-10T21:56:29.064Z] ----------------------------------------------------------------------
[2020-01-10T21:56:29.064Z]
[2020-01-10T21:56:29.083Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2020-01-10T21:56:29.083Z] > authorizing via signed-in user
[2020-01-10T21:56:29.084Z] [iam] checking project buyusedshopify for permissions ["firebase.projects.get"]
[2020-01-10T21:56:29.087Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/buyusedshopify:testIamPermissions
permissions=[firebase.projects.get]
[2020-01-10T21:56:30.516Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Fri, 10 Jan 2020 21:56:30 GMT, server=ESF, cache-control=private, x-xss-protection=0, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, server-timing=gfet4t7; dur=1191, alt-svc=quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000, accept-ranges=none, transfer-encoding=chunked
[2020-01-10T21:56:30.519Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/buyusedshopify
[2020-01-10T21:56:31.188Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Fri, 10 Jan 2020 21:56:31 GMT, server=ESF, cache-control=private, x-xss-protection=0, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000, accept-ranges=none, transfer-encoding=chunked
=== Serving from '/home/owner/PhpstormProjects/shopify/buyUsedServer'...
[2020-01-10T21:56:31.194Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/buyusedshopify/webApps/-/config
[2020-01-10T21:56:31.197Z] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at validateString (internal/validators.js:125:11)
at Object.join (path.js:1147:7)
at Object.<anonymous> (/usr/local/lib/node_modules/firebase-tools/lib/serve/functions.js:20:39)
at Generator.next (<anonymous>)
at /usr/local/lib/node_modules/firebase-tools/lib/serve/functions.js:7:71
at new Promise (<anonymous>)
at __awaiter (/usr/local/lib/node_modules/firebase-tools/lib/serve/functions.js:3:12)
at Object.start (/usr/local/lib/node_modules/firebase-tools/lib/serve/functions.js:18:16)
at /usr/local/lib/node_modules/firebase-tools/lib/serve/index.js:15:23
at arrayMap (/usr/local/lib/node_modules/firebase-tools/node_modules/lodash/lodash.js:639:23)
at Function.map (/usr/local/lib/node_modules/firebase-tools/node_modules/lodash/lodash.js:9554:14)
at _serve (/usr/local/lib/node_modules/firebase-tools/lib/serve/index.js:13:26)
at Command.module.exports.Command.description.option.option.option.option.before.action [as actionFn] (/usr/local/lib/node_modules/firebase-tools/lib/commands/serve.js:58:12)
at Command.<anonymous> (/usr/local/lib/node_modules/firebase-tools/lib/command.js:156:25)
at Generator.next (<anonymous>)
at fulfilled (/usr/local/lib/node_modules/firebase-tools/lib/command.js:4:58)
Error: An unexpected error has occurred.
Does anyone know what may cause this? Here is also my firebase.json:
// firebase.json
{
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint",
"npm --prefix \"$RESOURCE_DIR\" run build"
]
},
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
},
"emulators": {
"functions": {
"port": 5001
},
"firestore": {
"port": 8080
},
"hosting": {
"port": 5000
}
}
}
Console Output
$ firebase deploy
=== Deploying to '***'...
i deploying database, storage, firestore, functions, hosting
i database: checking rules syntax...
✔ database: rules syntax for database stulz-monitor is valid
i storage: checking storage.rules for compilation errors...
✔ storage: rules file storage.rules compiled successfully
i firestore: checking firestore.rules for compilation errors...
✔ firestore: rules file firestore.rules compiled successfully
i functions: ensuring necessary APIs are enabled...
i runtimeconfig: ensuring necessary APIs are enabled...
✔ runtimeconfig: all necessary APIs are enabled
✔ functions: all necessary APIs are enabled
i storage: uploading rules storage.rules...
i firestore: uploading rules firestore.rules...
i functions: preparing functions directory for uploading...
i functions: packaged functions (61.81 KB) for uploading
✔ functions: functions folder uploaded successfully
i hosting: preparing public directory for upload...
Error: Server Error. socket hang up
firebase-debug.log
[debug] [2017-11-22T14:36:06.359Z] ----------------------------------------------------------------------
[debug] [2017-11-22T14:36:06.362Z] Command: /Users/Sanket/.nvm/versions/node/v7.10.0/bin/node /Users/Sanket/.nvm/versions/node/v7.10.0/bin/firebase deploy
[debug] [2017-11-22T14:36:06.362Z] CLI Version: 3.15.2
[debug] [2017-11-22T14:36:06.362Z] Platform: darwin
[debug] [2017-11-22T14:36:06.362Z] Node Version: v7.10.0
[debug] [2017-11-22T14:36:06.363Z] Time: Wed Nov 22 2017 20:06:06 GMT+0530 (IST)
[debug] [2017-11-22T14:36:06.363Z] ----------------------------------------------------------------------
[debug]
[debug] [2017-11-22T14:36:06.376Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2017-11-22T14:36:06.376Z] > authorizing via signed-in user
[debug] [2017-11-22T14:36:06.378Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[debug] [2017-11-22T14:36:06.378Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token { refresh_token: '**********',
client_id: '***-***.apps.googleusercontent.com',
client_secret: '***',
grant_type: 'refresh_token',
scope: 'email https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/firebase openid' }
Wed Nov 22 2017 20:06:06 GMT+0530 (IST)
[debug] [2017-11-22T14:36:06.772Z] <<< HTTP RESPONSE 200
[debug] [2017-11-22T14:36:06.786Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/stulz-monitor
Wed Nov 22 2017 20:06:06 GMT+0530 (IST)
[debug] [2017-11-22T14:36:09.144Z] <<< HTTP RESPONSE 200
[debug] [2017-11-22T14:36:09.145Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/stulz-monitor/tokens
Wed Nov 22 2017 20:06:09 GMT+0530 (IST)
[debug] [2017-11-22T14:36:10.275Z] <<< HTTP RESPONSE 200
[info]
[info] === Deploying to 'stulz-monitor'...
[info]
[info] i deploying database, storage, firestore, functions, hosting
[info] i database: checking rules syntax...
[debug] [2017-11-22T14:36:13.405Z] >>> HTTP REQUEST PUT https://stulz-monitor.firebaseio.com/.settings/rules.json?dryRun=true {
"rules": {
".read": "true",
".write": "false"
}
}
Wed Nov 22 2017 20:06:13 GMT+0530 (IST)
[debug] [2017-11-22T14:36:14.696Z] <<< HTTP RESPONSE 200
[info] ✔ database: rules syntax for database stulz-monitor is valid
[debug] [2017-11-22T14:36:14.698Z] >>> HTTP REQUEST GET https://appengine.googleapis.com/v1/apps/stulz-monitor
Wed Nov 22 2017 20:06:14 GMT+0530 (IST)
[debug] [2017-11-22T14:36:16.644Z] <<< HTTP RESPONSE 200
[info] i storage: checking storage.rules for compilation errors...
[debug] [2017-11-22T14:36:16.651Z] >>> HTTP REQUEST POST https://firebaserules.googleapis.com/v1/projects/stulz-monitor:test { source: { files: [ [Object] ] } }
Wed Nov 22 2017 20:06:16 GMT+0530 (IST)
[debug] [2017-11-22T14:36:18.967Z] <<< HTTP RESPONSE 200
[info] ✔ storage: rules file storage.rules compiled successfully
[info] i firestore: checking firestore.rules for compilation errors...
[debug] [2017-11-22T14:36:18.974Z] >>> HTTP REQUEST POST https://firebaserules.googleapis.com/v1/projects/stulz-monitor:test { source: { files: [ [Object] ] } }
Wed Nov 22 2017 20:06:18 GMT+0530 (IST)
[debug] [2017-11-22T14:36:20.087Z] <<< HTTP RESPONSE 200
[info] ✔ firestore: rules file firestore.rules compiled successfully
[debug] [2017-11-22T14:36:20.089Z] > [functions] package.json contents: {
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"serve": "firebase serve --only functions",
"shell": "firebase experimental:functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"dependencies": {
"cors": "^2.8.4",
"express": "^4.16.2",
"firebase-admin": "~5.4.2",
"firebase-functions": "^0.7.1"
},
"private": true
}
[info] i functions: ensuring necessary APIs are enabled...
[info] i runtimeconfig: ensuring necessary APIs are enabled...
[debug] [2017-11-22T14:36:20.091Z] >>> HTTP REQUEST GET https://servicemanagement.googleapis.com/v1/services/cloudfunctions.googleapis.com/projectSettings/stulz-monitor?view=CONSUMER_VIEW
Wed Nov 22 2017 20:06:20 GMT+0530 (IST)
[debug] [2017-11-22T14:36:20.091Z] >>> HTTP REQUEST GET https://servicemanagement.googleapis.com/v1/services/runtimeconfig.googleapis.com/projectSettings/stulz-monitor?view=CONSUMER_VIEW
Wed Nov 22 2017 20:06:20 GMT+0530 (IST)
[debug] [2017-11-22T14:36:22.106Z] <<< HTTP RESPONSE 200
[info] ✔ runtimeconfig: all necessary APIs are enabled
[debug] [2017-11-22T14:36:22.403Z] <<< HTTP RESPONSE 200
[info] ✔ functions: all necessary APIs are enabled
[debug] [2017-11-22T14:36:22.405Z] >>> HTTP REQUEST GET https://appengine.googleapis.com/v1/apps/stulz-monitor
Wed Nov 22 2017 20:06:22 GMT+0530 (IST)
[debug] [2017-11-22T14:36:22.406Z] >>> HTTP REQUEST GET https://apikeys.googleapis.com/v1/projects/stulz-monitor/apiKeys
Wed Nov 22 2017 20:06:22 GMT+0530 (IST)
[debug] [2017-11-22T14:36:24.197Z] <<< HTTP RESPONSE 200
[debug] [2017-11-22T14:36:24.610Z] <<< HTTP RESPONSE 200
[info] i storage: uploading rules storage.rules...
[debug] [2017-11-22T14:36:24.615Z] >>> HTTP REQUEST POST https://firebaserules.googleapis.com/v1/projects/stulz-monitor/rulesets { source: { files: [ [Object] ] } }
Wed Nov 22 2017 20:06:24 GMT+0530 (IST)
[debug] [2017-11-22T14:36:25.990Z] <<< HTTP RESPONSE 200
[debug] [2017-11-22T14:36:25.990Z] [rules] created ruleset projects/stulz-monitor/rulesets/98ac1f07-a129-4ff1-ac20-1638fb3c2e30
[info] i firestore: uploading rules firestore.rules...
[debug] [2017-11-22T14:36:25.994Z] >>> HTTP REQUEST POST https://firebaserules.googleapis.com/v1/projects/stulz-monitor/rulesets { source: { files: [ [Object] ] } }
Wed Nov 22 2017 20:06:25 GMT+0530 (IST)
[debug] [2017-11-22T14:36:25.995Z] >>> HTTP REQUEST GET https://firestore.googleapis.com/v1beta1/projects/stulz-monitor/databases/(default)/indexes
Wed Nov 22 2017 20:06:25 GMT+0530 (IST)
[debug] [2017-11-22T14:36:27.258Z] <<< HTTP RESPONSE 200
[debug] [2017-11-22T14:36:27.259Z] [rules] created ruleset projects/stulz-monitor/rulesets/591c5d82-24bd-4146-8b75-4f672c24671a
[debug] [2017-11-22T14:36:28.077Z] <<< HTTP RESPONSE 200
[info] i functions: preparing functions directory for uploading...
[debug] [2017-11-22T14:36:40.095Z] >>> HTTP REQUEST GET https://runtimeconfig.googleapis.com/v1beta1/projects/stulz-monitor/configs
Wed Nov 22 2017 20:06:40 GMT+0530 (IST)
[debug] [2017-11-22T14:36:40.685Z] <<< HTTP RESPONSE 200
[info] i functions: packaged functions (61.81 KB) for uploading
[debug] [2017-11-22T14:36:48.198Z] >>> HTTP REQUEST GET https://www.googleapis.com/storage/v1/b/staging.stulz-monitor.appspot.com
Wed Nov 22 2017 20:06:48 GMT+0530 (IST)
[debug] [2017-11-22T14:36:48.865Z] <<< HTTP RESPONSE 200
[debug] [2017-11-22T14:36:48.866Z] >>> HTTP REQUEST POST https://www.googleapis.com/upload/storage/v1/b/staging.stulz-monitor.appspot.com/o?uploadType=media&name=firebase-functions-source ReadStream {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 65536,
buffer: BufferList { head: [Object], tail: [Object], length: 1 },
length: 63292,
pipes: null,
pipesCount: 0,
flowing: null,
ended: true,
endEmitted: false,
reading: false,
sync: false,
needReadable: false,
emittedReadable: true,
readableListening: false,
resumeScheduled: false,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: true,
domain: null,
_events: { end: [Function] },
_eventsCount: 1,
_maxListeners: undefined,
path: '/var/folders/n3/h9nbc_ys2732s35_9jlgh98c0000gn/T/firebase-functions-6515Ngn1HNgoFfUM.zip',
fd: 19,
flags: 'r',
mode: 438,
start: undefined,
end: undefined,
autoClose: true,
pos: undefined,
bytesRead: 63292 }
Wed Nov 22 2017 20:06:48 GMT+0530 (IST)
[debug] [2017-11-22T14:36:50.768Z] <<< HTTP RESPONSE 200
[info] ✔ functions: functions folder uploaded successfully
[info] i hosting: preparing public directory for upload...
[debug] [2017-11-22T14:36:50.944Z] >>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/stulz-monitor/uploads/-KzZ98-Ef8hX6Lqfgw2J?fileCount=16&message=
Wed Nov 22 2017 20:06:50 GMT+0530 (IST)
[debug] [2017-11-22T14:37:52.379Z] Error: socket hang up
at TLSSocket.onHangUp (_tls_wrap.js:1120:19)
at Object.onceWrapper (events.js:293:19)
at emitNone (events.js:91:20)
at TLSSocket.emit (events.js:188:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
[error]
[error] Error: Server Error. socket hang up
[debug] [2017-11-22T14:38:33.433Z] ----------------------------------------------------------------------
[debug] [2017-11-22T14:38:33.436Z] Command: /Users/Sanket/.nvm/versions/node/v7.10.0/bin/node /Users/Sanket/.nvm/versions/node/v7.10.0/bin/firebase deploy --only hosting
[debug] [2017-11-22T14:38:33.437Z] CLI Version: 3.15.2
[debug] [2017-11-22T14:38:33.437Z] Platform: darwin
[debug] [2017-11-22T14:38:33.437Z] Node Version: v7.10.0
[debug] [2017-11-22T14:38:33.437Z] Time: Wed Nov 22 2017 20:08:33 GMT+0530 (IST)
[debug] [2017-11-22T14:38:33.437Z] ----------------------------------------------------------------------
[debug]
[debug] [2017-11-22T14:38:33.452Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2017-11-22T14:38:33.452Z] > authorizing via signed-in user
[debug] [2017-11-22T14:38:33.455Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/stulz-monitor
Wed Nov 22 2017 20:08:33 GMT+0530 (IST)
[debug] [2017-11-22T14:38:34.805Z] <<< HTTP RESPONSE 200
[debug] [2017-11-22T14:38:34.807Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/stulz-monitor/tokens
Wed Nov 22 2017 20:08:34 GMT+0530 (IST)
[debug] [2017-11-22T14:38:36.037Z] <<< HTTP RESPONSE 200
[info]
[info] === Deploying to 'stulz-monitor'...
[info]
[info] i deploying hosting
[info] i hosting: preparing public directory for upload...
[debug] [2017-11-22T14:38:38.871Z] >>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/stulz-monitor/uploads/-KzZ9djhjEHEc1iN3KTI?fileCount=16&message=
Wed Nov 22 2017 20:08:38 GMT+0530 (IST)
[debug] [2017-11-22T14:41:44.756Z] ----------------------------------------------------------------------
[debug] [2017-11-22T14:41:44.759Z] Command: /Users/Sanket/.nvm/versions/node/v7.10.0/bin/node /Users/Sanket/.nvm/versions/node/v7.10.0/bin/firebase deploy
[debug] [2017-11-22T14:41:44.759Z] CLI Version: 3.15.2
[debug] [2017-11-22T14:41:44.759Z] Platform: darwin
[debug] [2017-11-22T14:41:44.759Z] Node Version: v7.10.0
[debug] [2017-11-22T14:41:44.760Z] Time: Wed Nov 22 2017 20:11:44 GMT+0530 (IST)
[debug] [2017-11-22T14:41:44.760Z] ----------------------------------------------------------------------
[debug]
[debug] [2017-11-22T14:41:44.775Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2017-11-22T14:41:44.775Z] > authorizing via signed-in user
[debug] [2017-11-22T14:41:44.778Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/stulz-monitor
Wed Nov 22 2017 20:11:44 GMT+0530 (IST)
[debug] [2017-11-22T14:41:47.277Z] <<< HTTP RESPONSE 200
[debug] [2017-11-22T14:41:47.278Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/stulz-monitor/tokens
Wed Nov 22 2017 20:11:47 GMT+0530 (IST)
[debug] [2017-11-22T14:41:49.540Z] <<< HTTP RESPONSE 200
[info]
[info] === Deploying to 'stulz-monitor'...
[info]
[info] i deploying database, storage, firestore, functions, hosting
[info] i database: checking rules syntax...
[debug] [2017-11-22T14:41:52.281Z] >>> HTTP REQUEST PUT https://stulz-monitor.firebaseio.com/.settings/rules.json?dryRun=true {
"rules": {
".read": "true",
".write": "false"
}
}
Wed Nov 22 2017 20:11:52 GMT+0530 (IST)
[debug] [2017-11-22T14:41:53.550Z] <<< HTTP RESPONSE 200
[info] ✔ database: rules syntax for database stulz-monitor is valid
[debug] [2017-11-22T14:41:53.552Z] >>> HTTP REQUEST GET https://appengine.googleapis.com/v1/apps/stulz-monitor
Wed Nov 22 2017 20:11:53 GMT+0530 (IST)
[debug] [2017-11-22T14:41:55.852Z] <<< HTTP RESPONSE 200
[info] i storage: checking storage.rules for compilation errors...
[debug] [2017-11-22T14:41:55.859Z] >>> HTTP REQUEST POST https://firebaserules.googleapis.com/v1/projects/stulz-monitor:test { source: { files: [ [Object] ] } }
Wed Nov 22 2017 20:11:55 GMT+0530 (IST)
[debug] [2017-11-22T14:41:57.208Z] <<< HTTP RESPONSE 200
[info] ✔ storage: rules file storage.rules compiled successfully
[info] i firestore: checking firestore.rules for compilation errors...
[debug] [2017-11-22T14:41:57.216Z] >>> HTTP REQUEST POST https://firebaserules.googleapis.com/v1/projects/stulz-monitor:test { source: { files: [ [Object] ] } }
Wed Nov 22 2017 20:11:57 GMT+0530 (IST)
[debug] [2017-11-22T14:41:58.592Z] <<< HTTP RESPONSE 200
[info] ✔ firestore: rules file firestore.rules compiled successfully
[debug] [2017-11-22T14:41:58.598Z] > [functions] package.json contents: {
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"serve": "firebase serve --only functions",
"shell": "firebase experimental:functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"dependencies": {
"cors": "^2.8.4",
"express": "^4.16.2",
"firebase-admin": "~5.4.2",
"firebase-functions": "^0.7.1"
},
"private": true
}
[info] i functions: ensuring necessary APIs are enabled...
[info] i runtimeconfig: ensuring necessary APIs are enabled...
[debug] [2017-11-22T14:41:58.599Z] >>> HTTP REQUEST GET https://servicemanagement.googleapis.com/v1/services/cloudfunctions.googleapis.com/projectSettings/stulz-monitor?view=CONSUMER_VIEW
Wed Nov 22 2017 20:11:58 GMT+0530 (IST)
[debug] [2017-11-22T14:41:58.600Z] >>> HTTP REQUEST GET https://servicemanagement.googleapis.com/v1/services/runtimeconfig.googleapis.com/projectSettings/stulz-monitor?view=CONSUMER_VIEW
Wed Nov 22 2017 20:11:58 GMT+0530 (IST)
[debug] [2017-11-22T14:42:00.952Z] <<< HTTP RESPONSE 200
[info] ✔ runtimeconfig: all necessary APIs are enabled
[debug] [2017-11-22T14:42:01.185Z] <<< HTTP RESPONSE 200
[info] ✔ functions: all necessary APIs are enabled
[debug] [2017-11-22T14:42:01.186Z] >>> HTTP REQUEST GET https://appengine.googleapis.com/v1/apps/stulz-monitor
Wed Nov 22 2017 20:12:01 GMT+0530 (IST)
[debug] [2017-11-22T14:42:01.186Z] >>> HTTP REQUEST GET https://apikeys.googleapis.com/v1/projects/stulz-monitor/apiKeys
Wed Nov 22 2017 20:12:01 GMT+0530 (IST)
[debug] [2017-11-22T14:42:02.850Z] <<< HTTP RESPONSE 200
[debug] [2017-11-22T14:42:02.902Z] <<< HTTP RESPONSE 200
[info] i storage: uploading rules storage.rules...
[debug] [2017-11-22T14:42:02.908Z] >>> HTTP REQUEST POST https://firebaserules.googleapis.com/v1/projects/stulz-monitor/rulesets { source: { files: [ [Object] ] } }
Wed Nov 22 2017 20:12:02 GMT+0530 (IST)
[debug] [2017-11-22T14:42:07.651Z] <<< HTTP RESPONSE 200
[debug] [2017-11-22T14:42:07.652Z] [rules] created ruleset projects/stulz-monitor/rulesets/ab4b440f-7ced-48f1-ac72-fd53aaf85597
[info] i firestore: uploading rules firestore.rules...
[debug] [2017-11-22T14:42:07.655Z] >>> HTTP REQUEST POST https://firebaserules.googleapis.com/v1/projects/stulz-monitor/rulesets { source: { files: [ [Object] ] } }
Wed Nov 22 2017 20:12:07 GMT+0530 (IST)
[debug] [2017-11-22T14:42:07.657Z] >>> HTTP REQUEST GET https://firestore.googleapis.com/v1beta1/projects/stulz-monitor/databases/(default)/indexes
Wed Nov 22 2017 20:12:07 GMT+0530 (IST)
[debug] [2017-11-22T14:42:09.570Z] <<< HTTP RESPONSE 200
[debug] [2017-11-22T14:42:13.542Z] <<< HTTP RESPONSE 200
[debug] [2017-11-22T14:42:13.543Z] [rules] created ruleset projects/stulz-monitor/rulesets/bfab570a-f997-41b8-a6d3-1c77a41572c5
[info] i functions: preparing functions directory for uploading...
[debug] [2017-11-22T14:42:25.884Z] >>> HTTP REQUEST GET https://runtimeconfig.googleapis.com/v1beta1/projects/stulz-monitor/configs
Wed Nov 22 2017 20:12:25 GMT+0530 (IST)
[debug] [2017-11-22T14:42:31.838Z] <<< HTTP RESPONSE 200
[info] i functions: packaged functions (61.81 KB) for uploading
[debug] [2017-11-22T14:42:39.537Z] >>> HTTP REQUEST GET https://www.googleapis.com/storage/v1/b/staging.stulz-monitor.appspot.com
Wed Nov 22 2017 20:12:39 GMT+0530 (IST)
[debug] [2017-11-22T14:42:40.019Z] <<< HTTP RESPONSE 200
[debug] [2017-11-22T14:42:40.020Z] >>> HTTP REQUEST POST https://www.googleapis.com/upload/storage/v1/b/staging.stulz-monitor.appspot.com/o?uploadType=media&name=firebase-functions-source ReadStream {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 65536,
buffer: BufferList { head: [Object], tail: [Object], length: 1 },
length: 63292,
pipes: null,
pipesCount: 0,
flowing: null,
ended: true,
endEmitted: false,
reading: false,
sync: false,
needReadable: false,
emittedReadable: true,
readableListening: false,
resumeScheduled: false,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: true,
domain: null,
_events: { end: [Function] },
_eventsCount: 1,
_maxListeners: undefined,
path: '/var/folders/n3/h9nbc_ys2732s35_9jlgh98c0000gn/T/firebase-functions-6597f3AGZ4D601g7.zip',
fd: 19,
flags: 'r',
mode: 438,
start: undefined,
end: undefined,
autoClose: true,
pos: undefined,
bytesRead: 63292 }
Wed Nov 22 2017 20:12:40 GMT+0530 (IST)
[debug] [2017-11-22T14:42:47.020Z] <<< HTTP RESPONSE 200
[info] ✔ functions: functions folder uploaded successfully
[info] i hosting: preparing public directory for upload...
[debug] [2017-11-22T14:42:47.219Z] >>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/stulz-monitor/uploads/-KzZAQa7e_nVP17jXgzQ?fileCount=16&message=
Wed Nov 22 2017 20:12:47 GMT+0530 (IST)
[debug] [2017-11-22T14:44:39.346Z] Error: socket hang up
at createHangUpError (_http_client.js:302:15)
at TLSSocket.socketOnEnd (_http_client.js:394:23)
at emitNone (events.js:91:20)
at TLSSocket.emit (events.js:188:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
[error]
[error] Error: Server Error. socket hang up
I know it's late to answer this, but anyway i'll do it.
I too faced with this problem many times. Then I found that it is caused by unstable internet connection. Try with other networks and you may be able to deploy, or try restarting your internet connection.
I had issues with this when deploying while using a VPN like tunnelbear. Try disabling that and see if it helps.
I have also tried deleted my cloud functions from google cloud console before trying to deploy again, which has helped in other similarly weird circumstances.
https://console.cloud.google.com/functions/list?project=
This is late but may be helpful for someone. For me it was just due to bad internet connection. It failed like 3-4 times literally (it was the same time window in which my internet got limited that i was getting "socket hung up message"). So make sure internet is working fine. Hope it helps.
The problem solved itself automatically after a while.
It seems like it was a problem from Google's end.
I am trying to deploy my site to firebase which I have done before but now it is saying "Error: An unknown error occurred. Please contact support." The contents of the firebase-debug.log file follows:
[debug] ----------------------------------------------------------------------
[debug] Command: /usr/bin/nodejs /usr/bin/firebase deploy
[debug] Platform: linux
[debug] Node Version: v4.3.0
[debug] Time: Mon Feb 22 2016 13:58:38 GMT-0700 (MST)
[debug] ----------------------------------------------------------------------
[debug]
[debug] >>> HTTP REQUEST GET https://admin.firebase.com/firebase/joshweaverspark/token?token=XXX
[error]
[error] Error: An unknown error occurred. Please contact support.
[debug] Error Context: {
"requestOptions": {
"method": "GET",
"json": true,
"url": "https://admin.firebase.com/firebase/joshweaverspark/token?token=-KA3RgJFHuDHz6BHvFQF%7C3b00cd5fc3e1c76f43a26385a3f680c0"
},
"body": {
"error": {
"code": "UNKNOWN_ERROR",
"message": "An unknown error occurred. Please contact support."
}
},
"response": {
"statusCode": 500,
"body": {
"error": {
"code": "UNKNOWN_ERROR",
"message": "An unknown error occurred. Please contact support."
}
},
"headers": {
"server": "nginx",
"date": "Mon, 22 Feb 2016 20:58:54 GMT",
"content-type": "application/json; charset=utf-8",
"content-length": "97",
"connection": "close",
"access-control-allow-origin": "*",
"access-control-allow-methods": "GET, PUT, POST, DELETE, OPTIONS",
"x-content-type-options": "nosniff"
},
"request": {
"uri": {
"protocol": "https:",
"slashes": true,
"auth": null,
"host": "admin.firebase.com",
"port": 443,
"hostname": "admin.firebase.com",
"hash": null,
"search": "?token=-KA3RgJFHuDHz6BHvFQF%7C3b00cd5fc3e1c76f43a26385a3f680c0",
"query": "token=-KA3RgJFHuDHz6BHvFQF%7C3b00cd5fc3e1c76f43a26385a3f680c0",
"pathname": "/firebase/joshweaverspark/token",
"path": "/firebase/joshweaverspark/token?token=-KA3RgJFHuDHz6BHvFQF%7C3b00cd5fc3e1c76f43a26385a3f680c0",
"href": "https://admin.firebase.com/firebase/joshweaverspark/token?token=-KA3RgJFHuDHz6BHvFQF%7C3b00cd5fc3e1c76f43a26385a3f680c0"
},
"method": "GET",
"headers": {
"accept": "application/json"
}
}
}
}
After updating Node.js, i was able to deploy the project.
You can try the same by updating Node.js:
sudo npm install npm#latest -g
In my case upgrading node and npm wasn't enough, but upgrading firebase-tools, fixed the problem
npm install -g firebase-tools