Sitecore JSS (Headless) + React. Can not deploy app. Status: 403 - reactjs

I am trying to deploy my first react app.
I have followed all the steps according to the instructions.
But when it comes to app deployment I keep getting the same message.
Unexpected response from import status service. The import task is probably still running; check the Sitecore logs for details.
Status message:
Status: [403]
Can anyone help me with this?
Hosts added
Confings and the error
Api is working

please go through my comment on : 403 error when importing a new JSS app to Sitecore 10.2
also make sure your API key and layout service is configured properly e.g. http://myapp.siteco.re/sitecore/api/layout/render/jss?item=/&sc_apikey={YOUR_API_KEY_ID}
Similar kind of issue: 403 error when importing a new JSS app to Sitecore 10.2

Related

loading Stripe with React Stripe js fails with CORP error

I am working on a react application that is using React Stripe package to connect to Stripe.
I am trying to use Stripe PaymentElement to gather card information. Everything works fine in development mode but when I build the code for production and I deploy it on a test server I get this errors in the browser console:
The resource at “https://js.stripe.com/v3” was blocked due to its Cross-Origin-Resource-Policy header (or lack thereof). See https://developer.mozilla.org/docs/Web/HTTP/Cross-Origin_Resource_Policy_(CORP)#
How can I fix this error?

HTTP Error 404.3 - Not Found - backend .net core, frontend react hosted on azure app service

HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
I got this error when accessing react frontend. the app is hosted on the azure app service. so anyone knows how to fix this? is it need to be done in react side?

Can not remove AWS Amplify Auth

I have a web app using the following amplify resources:
Auth
API
Function
Hosting
I have been having issues with the Auth service giving the following network error when going through the Auth0 flows:
error message in the headers:
x-amzn-errormessage: IdentityPool 'us-east-2:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' not found.
Error message in console:
POST https://cognito-identity.us-east-2.amazonaws.com/ 400
So I am trying to completely remove the Auth section and try and build it again from scratch.
However, when I run:
amplify remove auth
it removes the Auth in my local code, but then won't allow me to "amplify push" or "amplify publish" because the auth service can not be found 🤦🏼‍♂️🤦🏼‍♂️🤦🏼‍♂️ and I get this message:
Template error: instance of Fn::GetAtt references undefined resource auththisismyappg986421b An error occurred during the push operation: Template error: instance of Fn::GetAtt references undefined resource auththisismyappg986421b
Anyone know how to solve this? or advice on how to get
AWS Amplify - React - React Router (using protected routes) to all play along nicely?
Do you have any other resources that depend on auth? (api, storage, etc.)
If you do, when you do remove auth you get this warning:
You have configured resources that might depend on this Cognito resource. Updating this Cognito resource could have unintended side effects.
Judging from you message you might have an API that depends on your Auth. Look at amplify/api/YOURAPI/parameters.json, you should have
{
"AppSyncApiName": "YOURAPI",
"AuthCognitoUserPoolId": {
"Fn::GetAtt": [
"auththisismyappg986421b",
"Outputs.UserPoolId"
]
}
}
Therefore a dependency to your deleted auth still exists and Amplify does not like that.
What you can do is create your new auth from scratch, then you'll get a new userPoolID let's say auththisismyappgXXXXXXX and replace every instances of auththisismyappg986421b with auththisismyappgXXXXXXX.
Edit: by the way if anyone has a way to do it more cleanly through amplify CLI that would be nice :)

react native 404 not found while using deployed endpoint

I'm using React Native to work on my project. The problem I'm facing: it is working perfectly 200 ok while fetching data locally but, when I try to use after deployment it says 404 not found.
What could be the reason?
A 404 error is an HTTP status code that means that the page you were trying to reach, couldn't be found on their server.

angular2-sails 404 error (not found)

I am having difficulty hooking up my sql server with a front end of angular 2.
I ran the sailsjs getting started guide
I then hooked up angular2 with sails. I followed the sharpten guide
http://sharpten.com/blog/2016/02/02/integrating-angular-2-with-sails-js.html
I then used the sails-sqlserver package to connect to my localhost sql server
sails-sqlserver
I have the sails returning my data and now i want to use angular 2 to interact with the data.
I found the angular2-sails package.
https://www.npmjs.com/package/angular2-sails
However, I am getting a 404 error with the angular2-sails package
ERROR:
zone.js:1382
"GET http: //localhost:1337/node_modules/angular2-sails/ 404 (Not Found)"
How do i get rid of this 404 error?
Thanks.
I got this to work with version 0.1.4 of angular2-sails.
i commented out the sailsmodule due to version 0.1.4 just having the SailsService
//import {SailsModule} from "angular2-sails";
In my component I imported the SailsService
import {SailsService} from "angular2-sails/dist/index";

Resources