where to get deployment logs of azure app service VS-Code extension - reactjs

i have a react site that am trying to deploy to azure app service (free tiers windows) plan.
i am using VS-Code's Azure App service extention.
when i right click deploy to web app i get the error
11:44:47 AM amn-react-app: Starting deployment...
11:44:47 AM amn-react-app: Creating zip package...
11:53:39 AM amn-react-app: Zip package size: 298 MB
11:53:40 AM: Error: An error has occurred.
where to see the deployment logs to check what happened ?
update
following the update below i was able to see logs but they still not telling details.

I use vscode create a sample react project to test.
And I found, we can check delpoyment logs on portal.
Method 1
Method 2
I also try to use rest api to get deployments info, but failed because I don't find deployment id. If you are interested, you can also try.
Web Apps - Get Deployment

Related

Successful deployment still leads to default page

I followed the contents of three different tutorials in deploying a slightly-modified boilerplate React app to Azure App Services. The primary issue I'm having is that while all deployment pipelines and releases have been successful on Azure DevOps, navigating to the page results in the default landing page for non-deployed app services;
Hey, Node developers!
Your app service is up and running.
Time to take the next step and deploy your code.
I'll briefly describe the steps I took to get to this point:
I used create-react-app to generate a basic template, ran all the prerequisite commands, fiddled with the app.js file and its CSS companion, and left index.* untouched.
I pushed all of it with an untouched gitignore to a Github repository.
I created an App Service, running Linux and Node 12 LTS, on the Free plan.
I created a DevOps project, and within it created a Pipeline and a Release Pipeline.
In the Pipeline: I retrieved my repository source via linked accounts in the Get Sources step. In Agent job 1, I added a npm install element, a npm run build element, and a Publish Artifact element. I set the path to build, and artifact name to artifact, publishing to Azure Pipelines.
In the Release Pipeline: I added an artifact that grabs its source from the previous pipeline, and gives a source alias of _artifact. CD trigger is enabled. I added a stage that has a Deploy Azure App Service element, using $(System.DefaultWorkingDirectory)/_artifact/artifact as the package/folder.
When I push a commit or manually trigger the first pipeline, everything succeeds with no obvious errors. The Release pipeline is triggered and also completes without error. Checking the logs, the artifact is stored and accessed accurately. I can see the correct build files being accessed.
In the Azure portal, I can see that deployment has succeeded with the correct timestamp, commit name, and pipelines. However, when I access the actual site, I am shown the generic page.
Am I missing a crucial step somewhere? I've tried navigating to /index.html, /src/index.html, and a bunch of other combinations of known files, but to no avail; Cannot GET /index.html.
Any insight would be appreciated.
For reference, I used these three walkthroughs:
https://medium.com/microsoftazure/deploying-create-react-app-as-a-static-site-on-azure-dd1330b215a5
https://medium.com/#to_pe/deploying-create-react-app-on-microsoft-azure-c0f6686a4321
https://www.pluralsight.com/guides/deploy-a-react-app-to-azure
This question is very simple, you can refer to the following post.
1. Deploy create-react-app with azure pipelines
2. Unable to deploy React JS application on Azure App service
3. Process for React App deployment to Azure Web?
Suggestion:
It is recommended to choose linux when creating a webapp.
Configuration->StartupCommand: pm2 serve /home/site/wwwroot --no-daemon --spa

Running NextJS on production azure app service?

I have a nextjs react website running fine locally, after I ran 'next build' I got a .next file. I tried uploading the contents to azure app services but when I visit the URL I get an error that I don't have permission to view this page.
From googling the issue I've found that I need to install something on the azure app service: https://github.com/MRCollective/nextjs-server-azuresiteextension - "Install the nextjs-server site extension (either via the Portal or programmatically via ARM)" but I don't understand what that means or where I can find it (extensions in portal and site extensions does not have nextjs-server)

Unable to deploy app engine app using Eclipse plugin

My user has "App Engine Deployer" & "App Engine Admin" permission. When I try to deploy the app using Eclipse, I get following error -
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/datastore/index/add?app_id=xxxxxxxxxx&version=9&
403 Forbidden
You do not have permission to modify this app (app_id=u's~xxxxxxxxxx').
Though when I check cloud control panel, I see that the app is deployed. Why this error?
Here is full deployment console detail:
Preparing to deploy:
Created staging directory at: 'C:\Users\punit\AppData\Local\Temp\appcfg2201895061249198461.tmp'
Scanning for jsp files.
Compiling jsp files.
Scanning files on local disk.
Initiating update.
Cloning 3 static files.
Cloning 29 application files.
Deploying:
Uploading 0 files.
Initializing precompilation...
Deploying new version.
Closing update: new version is ready to start serving.
Uploading index definitions.
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/datastore/index/add?app_id=xxxxxxxxxx&version=9&
403 Forbidden
You do not have permission to modify this app (app_id=u's~xxxxxxxxxx').
And here is stacktrace in the log:
Unable to update:
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/datastore/index/add?app_id=xxxxxxxxxx&version=9&
403 Forbidden
You do not have permission to modify this app (app_id=u's~xxxxxxxxxx').
at com.google.appengine.tools.admin.AbstractServerConnection.send1(AbstractServerConnection.java:336)
at com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:287)
at com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:266)
at com.google.appengine.tools.admin.NoLoggingClientDeploySender.send(NoLoggingClientDeploySender.java:35)
at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:1168)
at com.google.appengine.tools.admin.AppVersionUpload.updateIndexes(AppVersionUpload.java:534)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:205)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:572)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:58)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:433)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:158)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
I had exactly the same error, no matter if I tried from Eclipse, from commandline with mvn appengine:update or with appcfg.sh update. The situation is that it's not possible to update
Datastore indices
Task queues
Cron jobs
403 Forbidden You do not have permission to modify this app
(app_id=u's~xxxxxxxxxx').
The only way to achieve a complete deployment seems to grant the user Project Owner permissions (maybe Project Editor would have been enough, I didn't test that) at least temporarily.

Internal error on deployment to google appengine

I'm trying to get Vaadin7 app working on Google app-engine. I use app-engine sdk 1.8.5 with eclipse juno.
Deployment seems to work since I get:
------------ Deploying frontend ------------
Preparing to deploy:
Created staging directory at: '/tmp/appcfg4530509922106401908.tmp'
Scanning for jsp files.
Scanning files on local disk.
Initiating update.
Cloning 4 static files.
Cloning 8 application files.
Deploying:
Uploading 0 files.
Initializing precompilation...
Deploying new version.
Verifying availability:
Will check again in 1 seconds.
Will check again in 2 seconds.
Will check again in 4 seconds.
Will check again in 8 seconds.
Closing update: new version is ready to start serving.
Updating datastore:
Uploading index definitions.
Deployment completed successfully
However at the end of operation there is a pop-up saying:
An internal error occurred during: "Deploying <app-name> to Google".
java.lang.NullPointerException
Nothing is written to log file and I have no clue what kind of nullpointer is that. Accessing the application from web-browser gives HTTP 500.
Any tips on what can be the reason/possible solution?
Normally, after a successful deployment, the Google App Engine Eclipse plugin launches a browser tab pointing to your-app-id.appspot.com. If this fails, you can get a NullPointerException as you have described.
This is what happens to me, at least, with Eclipse 4.3 (Kepler) and app-engine sdk 1.8.6.
In this situation, your backend has indeed been deployed and it is safe to ignore this error. You will have to, however, launch or refresh your browswer tab manually.

it gives an alert on eclipse : Unable to Update : appengine-api-1.0-sdk-1.5.0.jar (Access is denied) when deployed to GAE

I am unable to deploy my application to google app engine however I can deploy it when I try 2nd or 3rd time. I get an alert on eclise as well as the log on console as below:
------------ Deploying frontend ------------
Preparing to deploy:
Created staging directory at: 'C:\DOCUME~1\bg92344\LOCALS~1\Temp\appcfg2387862893654282649.tmp'
Scanning for jsp files.
Compiling jsp files.
Scanning files on local disk.
java.io.FileNotFoundException: C:\DOCUME~1\bg92344\LOCALS~1\Temp\appcfg2387862893654282649.tmp\WEB-INF\lib\appengine-api-1.0-sdk-1.5.0.jar (Access is denied)
Debugging information may be found in C:\Documents and Settings\bg92344\Local Settings\Temp\appengine-deploy8040646126412995823.log
One thing that I found peculiar that when I go to Temp\appcfg2387862893654282649.tmp\WEB-INF\lib\ the jar appengine-api-1.0-sdk-1.5.0.jar dissapears after i get this alert, I guess it is not copying the jar completely. I dont know why :(
Can anybody help me out on this. Thanks in advance.
Regards,
BaleSabu
1 Login from Eclipse to your Google account (left bottom icon)
2 Check you application id before deploy. Should be same to your application.
3 Your user should have owner or admin role for application you want to deploy
Try cleaning and rebuilding your project before attempting to deploy again. Alternatively try to restart your IDE or computer. This fixed my errors in Android Studio.

Resources