Autodesk Forge design automation [workitems request] fail in heroku deployment "Failed to create a workitem" - autodesk-forge

I've downloaded the Design automation sample from github https://github.com/Autodesk-Forge/learn.forge.designautomation/tree/nodejs
I followed the toturial to make it working locally,
my issue is after deploying the app to heroku and filled the secret data, every thing is working correctly except for the workitems request it fails with code 500 Internal Server Error and response:
{"diagnostic":"Failed to create a workitem"}
error screen shot
the error log file: https://mega.nz/file/b2Y3wTJD#FqyWubUvewk175j_Y75TfpwfkzZHNXhSH1Tt5NY4HPc

You need to update FORGE_WEBHOOK_URL to https://test-f-daa.herokuapp.com on Heroku as well, from the error log -
{"url":["Failed to create URL for 'undefined/api/forge/callback/designautomation?....

Related

#notionhq/client warn: request fail code: 'object_not_found'

I am trying to integrate Deepnote and Notion. I already connected the database with the integration in Notion, I added the environment variables correctly but when executing node index.js as suggested in Notion's documentation for integrations I get this error:
#notionhq/client warn: request fail {
code: 'object_not_found',
message: 'Could not find database with ID: ********************************. Make sure the relevant pages and databases are shared with your integration.'
}
The database is correctly sharing info with Deepnote integration: check this screenshot.
Any clues? Thanks so much <3
I am trying to connect Notion as database for Deepnote graphics so then can be iframed into Notion.

GCP deployment fails on "Updating service"

I have asp.net core application hosted on GCP App Engine. When I try to deploy the application it fails on last step:
Updating service [name] (this may take several minutes)... ...failed
ERROR: (gcloud.app.deploy) Error Response: [9] An internal error occurred while processing task /app-engine-flex/flex_await_healthy/flex_await_healthy>blablabla.wm.1
The exception stack trace show that service running in background couldn't find MySQL table (that table obviously exists).
my app.yaml file:
service: XXX
runtime: custom
env: flex
automatic_scaling:
max_concurrent_requests: 80
min_num_instances: 1
max_num_instances: 1
resources:
cpu: XXX
memory_gb: XXX
beta_settings:
cloud_sql_instances: "XXX:XXXX:XXXX=tcp:3306"
It looks like the application is deployed properly despite the error. This is the only error and backgroud service desn't throw any exceptions at later point. In fact it works properly and can connect to the database.
My guess was that maybe GCP is checking health while the application is not connected do database. So I tried to add liveness_check and readiness_check to app.yaml and configured dedicated /healthcheck endpoint in my application but it didn't make any change.
Any ideas how to fix it and what might be a cause?
Deploying app with new version fixed the issue

cannot create instance from local image

I am following a get started tutorial for gRPC, specifically the "Getting Started" example. I have created the image per ReadMe. I created the server image locally using Docker for Windows.
I create the Endpoint, I see it in the Console. I also created a VPC. I should be able to deploy now. I am attempting to use the GCE steps in ReadMe. I am stuck on:
gcloud compute instances create grpc-host --image-family gci-stable --image-project google-containers --tags=http-server --network=default --image-project
I get this error:
ERROR: (gcloud.compute.instances.create) Could not fetch resource:
The resource 'projects/debian-cloud/global/images/family/gci-stable' was not found
I don't think I missed a step. But, the error message appears to hint at some missing step.
Thanks.

Cannot GET /api/forge/oauth/callback

Im trying to test out this demo on my own windows machine: https://github.com/Autodesk-Forge/forge-bim360-clashissue
Ive successfully started had the template running with these commands.
npm install
set FORGE_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
set FORGE_CLIENT_SECRET=<<YOUR CLIENT SECRET>>
set FORGE_CALLBACK_URL=<<YOUR CALLBACK URL>>
npm run nodemon
Ive added a new app within the Forge My Apps interface.
Ive added the provisions for the the BIM 360 Account interface.
I can connect to my localhost, and when i press ALLOW to try to authenticate and login to the autodesk account, i get redirected to the following website with the following error:
http://localhost:3000/api/forge/oauth/callback?code=TOAq...
Cannot GET /api/forge/oauth/callback
How can i get past this error?
It looks like a configuration mismatch. You have configured the callback to be http://localhost:3000/api/forge/oauth/callback but according to https://github.com/Autodesk-Forge/forge-bim360-clashissue/blob/master/server/endpoints/oauth.endpoints.js#L72 your server actually expects the callback on a different URL: http://localhost:3000/api/forge/callback/oauth.

Heroku app: Error during WebSocket handshake: Unexpected response code: 200

I followed a tutorial on how to make a multiplayer tetris game, here is the repo:
https://github.com/Leftier/tetris
It worked just fine on localhost so I tried to deploy it in heroku (https://tetrixtest.herokuapp.com/ --ASD to move Q/E to rotate) but I get the following error:
WebSocket connection to 'wss://tetrixtest.herokuapp.com/' failed: Error during WebSocket handshake: Unexpected response code: 200
while trying to create the webSocket in this line (connection-manager.js line 14):
this.conn = new WebSocket(`wss://${window.location.hostname}:${window.location.port}`)
I don't know much about webSockets,
at first I thought that heroku was not able to handle websockets but that wasn't the case so I tried using the link directly as an argument instead of reading it from the browser but still the same issue.
I would like some clues/hints about why does this happens, I searched in google and github, but I only found issues related to socket.io
For me the solution was to turn on "Session affinity" by running this command heroku features:enable http-session-affinity
More info at https://devcenter.heroku.com/articles/session-affinity
Session affinity, sometimes referred to as sticky sessions, is a
platform feature that associates all HTTP requests coming from an
end-user with a single application instance (web dyno).