Autodesk-Forge/forge-configurator-inventor

Azure deployment problem

Closed this issue · 3 comments

https://stackoverflow.com/questions/69090973/autodesk-forge-configurator-inventor-azure-deployment-problem

I have troubles with deploying an app to Azure.

I started with https://github.com/Autodesk-Forge/forge-configurator-inventor repo. I managed to run it locally with no errors. I am able to login, upload my own zipped files, change parameters, export pdf and download it. Everything is fine. Now i want to publish app to azure.

App is currently running so You can check it out: https://pjk-config.azurewebsites.net

WHAT IS WRONG: I cannot upload any models after login. No error is displayed. If I make change in wrench or wheel model and update it, I won't happened either.

What I did:

created azure account,
changed callback url to my app (in my situation: "https://pjk-config.azurewebsites.net/"),
I changed WebApplication.Program.cs by removing the UseKestrel() statement ( please check that)
{
webBuilder.UseStartup();
var port = Environment.GetEnvironmentVariable("PORT");
// If deployed to a service like Heroku, need to listen on port defined in the environment, not the default one
if (!string.IsNullOrEmpty(port))
{
webBuilder.UseUrls("http://*:" + port);
Log.Logger.Information($"PORT environment variable defined to:{port}");
}
});
appsettings:

inviteonlymode - false
embedded mode - false
publisher settings: (but I see polling in output so I think something is missing)
"CompletionCheck": "Callback",
"CallbackUrlBase": "https://pjk-config.azurewebsites.net"

I deployed through VS 2019 with WebApplication right click - publish using this reference: https://docs.microsoft.com/en-us/visualstudio/deployment/quickstart-deploy-to-azure?view=vs-2019
If you need any additional info just let me know. I am fighting with this almost 30 days by my own. I am beginner and this is my first question on this page so I apologize for lack of precise information about my problem. Just tell me what you need and I will send it over.

Hi Mike,

application itself produce output to standard output when running, would you know how to get to it on you Azure machine? There we might be able to see what is going wrong. Without it, we may just guess.
My first blind guess can be whether your callback works properly. Would you be able to change it to poll, at least for debugging purpose for a while?

(but I see polling in output so I think something is missing)

do you see polling when initializing data for the first time? If so, that is normal, initialization is using polling only.

Hello Michal,
thank you for your effort and help. I figured out how to deploy to azure and be able to run without bugs. It was about callback. In my situation Callback URL at my apps>Autodesk Forge should be https://myapp.azurewebsites.net (no slash at the end) and in the appsettings.json i went with that:

"Publisher": {
"CompletionCheck": "Polling",
"CallbackUrlBase": "https://myapp.azurewebsites.net/"

Notice the slash at the end.

Probably the next step will be changing CompletionCheck to Callback. I am looking and waiting for response to this issue:
#418

App is running and I can work on inventor part.

Thanks!

@MikeGie would it be able to connect on this issue? We would like to do some investigation.