firebase deployment issue with a react app - reactjs

I'm trying to deploy my react app on firebase but i get this error:
Error: Failed to list Firebase projects. See firebase-debug.log for more info.
and in the firebase-debug.log file this shows:
[info] First, let's associate this project directory with a Firebase project.
[info] You can create multiple project aliases by running firebase use --add,
[info] but for now we'll just set up a default project.
[info]
[debug] [2021-03-20T19:18:31.200Z] > refreshing access token with scopes: []
[debug] [2021-03-20T19:18:31.202Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token
[debug] [2021-03-20T19:18:32.948Z] <<< HTTP RESPONSE 200 {"expires":"Mon, 01 Jan 1990 00:00:00
GMT","cache-control":"no-cache, no-store, max-age=0, must-revalidate","date":"Sat, 20 Mar 2021 19:18:28 GMT","pragma":"no-cache","content-type":"application/json; charset=utf-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","server":"scaffolding on HTTPServer2","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-29=":443"; ma=2592000,h3-T051=":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"","accept-ranges":"none","transfer-encoding":"chunked"}
[debug] [2021-03-20T19:18:33.023Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects pageSize=100
[debug] [2021-03-20T19:18:35.619Z] Failed to make request: invalid json response body at https://firebase.googleapis.com/v1beta1/projects?pageSize=100 reason: Unexpected token < in JSON at position 0
[debug] [2021-03-20T19:18:37.235Z] FirebaseError: Failed to make request: invalid json response body at https://firebase.googleapis.com/v1beta1/projects?pageSize=100 reason: Unexpected token < in JSON at position 0
at Client.request (C:\Users\john tucker\AppData\Roaming\npm\node_modules\firebase-tools\lib\apiv2.js:109:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[error]
[error] Error: Failed to list Firebase projects. See firebase-debug.log for more info.
I have already tried to logout and login and made sure that my app exists in the firebase console .
I also get this error when I type firebase init in the terminal :
(node:12720) UnhandledPromiseRejectionWarning: FirebaseError: Failed to make request to https://firebase-public.firebaseio.com/cli.json
at Client.doRequest (C:\Users\john tucker\AppData\Roaming\npm\node_modules\firebase-tools\lib\apiv2.js:211:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:12720) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:12720) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

You have to follow this steps to deploy your react app online with fire-base hosting :
npm run build => Run the following command to create a build directory with a production build of your app
npm install -g firebase-tools => To host your site with Firebase Hosting, you need the Firebase command-line tool (CLI). Run the following npm command to install the CLI on your system globally
firebase login => If you're not logged in, you'll be asked to enter the credentials for your google account.
firebase init => to initialize firebase in your react app
firebase deploy => Firebase will now run the deploying process and will give you a unique URL where your app is deployed

Related

Build error occurred in Vercel when Deploying NextJs : Invalid JSON Token

Actually on my Laptop it is working well using npm run dev & when doing npm run build it is also worked without any error.
Build Success Image
And when deploying it to vercel i am getting error of
13:21:05.897 info - Collecting page data...
13:21:06.193 > Build error occurred
13:21:06.195 FetchError: invalid json response body at https://bcanepaltu.com/wp-json/wp/v2/posts?per_page=200 reason: Unexpected token < in JSON at position 0
13:21:06.195 at /vercel/path0/node_modules/node-fetch/lib/index.js:272:32
13:21:06.196 at processTicksAndRejections (internal/process/task_queues.js:93:5)
13:21:06.196 at async getStaticPaths (/vercel/path0/.next/server/pages/posts/[id].js:39:16)
13:21:06.196 at async buildStaticPaths (/vercel/path0/node_modules/next/dist/build/utils.js:16:80)
13:21:06.196 at async /vercel/path0/node_modules/next/dist/build/utils.js:26:622
13:21:06.196 at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/telemetry/trace/trace.js:6:584) {
13:21:06.196 type: 'invalid-json'
13:21:06.196 }
13:21:06.227 error Command failed with exit code 1.
13:21:06.227 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
13:21:06.247 Error: Command "yarn run build" exited with 1
So I am trying to fetch JSON of my WordPress site and generating posts whereas
https://bcanepaltu.com/wp-json/wp/v2/posts?per_page=200 working well on dev and while seeing on this URL
So why it is giving error of invalid JSON token ?

How to reset API permissions Microsoft Graph

I'm developing something using Microsoft Graph.
At first, just some permission is given.
But I found it's not enough. I added more permission.
But it seems it's not working. Because after I log in, the Authorization web doesn't come out
I'm following the steps here to use Microsoft Graph. and I'm using ADv1
I've added "User.ReadBasic.All".
I'm trying to get information by "/users?$select=displayName,userPrincipalName".
The error is as below
BotFrameworkAdapter.processActivity(): 500 ERROR - [object Object]
botFrameworkAdapter.ts:607
(node:1752) UnhandledPromiseRejectionWarning: Error: [object Object]
at BotFrameworkAdapter.processActivity (c:\Users\XXXXXX\src\botFrameworkAdapter.ts:608:19)
at process._tickCallback (internal/process/next_tick.js:68:7)
warning.js:18
(node:1752) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
warning.js:18
(node:1752) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
After updating the permissions, users and/or admins will have to consent again.
Click 'Grant admin consent for XXX' to grant admin consent.
Force user consent through a url request
https://login.microsoftonline.com/{tenant}/oauth2/authorize?
client_id={your_client_id}
&response_type=code
&response_mode=query
&resource=https://graph.microsoft.com
&state=12345
&prompt=consent
Refer to this document for more details.

Getting error when deploying an app into the GAE

I am trying to deploy an app into the GAE but I am getting this error:
appcfg.py -A email-1203 update test/11:25 AM Application: email-1203; version: 1
11:25 AM Host: appengine.google.com
11:25 AM
Starting update of app: email-1203, version: 1
11:25 AM Getting current resource limits.
2016-01-27 11:25:50,978 ERROR appcfg.py:2456 An error occurred processing file '': HTTP Error 403: Forbidden Unexpected HTTP status 403. Aborting.
Error 403: --- begin server output ---
You do not have permission to modify this app (app_id=u's~email-1203').
--- end server output ---

Google App Engine: An error occurred processing file '': Unauthorized. Aborting

When I try to deploy my application, I get this error: ERROR appcfg.py:2149 An error occurred processing file '': HTTP Error 401: Unauthorized. Aborting.
I provide my login and password correctly but I am not able to deploy my application.
Any solution?

Deploying a gradle script from Jenkins using the artifactory plugin

I'm trying to deploy a build from jenkins using the artifactory invocation of gradle plugin and get a an HTTP error 302, going through the log looks like there's a checksum problem that cannot be skipped:
13:35:41.463 [DEBUG] [org.jfrog.gradle.plugin.artifactory.task.BuildInfoBaseTask] Failed checksum deploy of checksum '8d80bb7f1bf2f0457baa3ad7379348c5ecbf2535' with statusCode: 302
13:35:41.466 [DEBUG] [org.apache.http.impl.conn.SingleClientConnManager] Get connection for route HttpRoute[{}->http://artifactory.edegem.eu.thmulti.com]
....
13:35:41.470 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnectionOperator] Connecting
13:35:41.503 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Receiving response: HTTP/1.1 302 Found
Any clue?
Thanks a lot.
302 is a status code for redirects, which means that your Artifactory is not located at 'http://artifactory.edegem.eu.thmulti.com' but in some other location. Browser follows the redirect to the new place (that's the reason you can browse Artifactory under this URL), but Artifactory networking is not. Please verify the 'real' location of Artifactory and point your Jenkins plugin to it.

Resources