1

I am using Autodesk Revit and have been trying to implement the Design Automation API. I have been successful in trying out the sample, modify-your-model tutorial where the dimensions of a window are altered. However the example code is not executing perfectly anymore and it displays an internal server error message(error code 500). The error console claims that some parameter in the workItem is missing. The code worked again on the morning of 14th March again, but by noon it started showing the same error. The error log on the web page and console are given below respectively. My question is, has the Autodesk OSS server been down for some time now or is it some fault from my side? Please help me out. P.S. The same code worked perfectly before. I have not edited anything. Yes, I did try changing the Client ID and Client Secret and also update the ngrok address every 2hours.

Sincerely

Error list

-Failed to load resource: the server responded with a status of 500 (Internal Server Error)

-No webpage was found for the web address: http://localhost:3000/api/forge/designautomation/workitems

error in debugger

-fail: Microsoft.AspNetCore.Server.Kestrel[13]
      Connection id "0HM76OJJ532MV", Request id "0HM76OJJ532MV:00000002": An unhandled exception was thrown by the application.
System.Net.Http.HttpRequestException: The server returned the non-success status code 400 (Bad Request).

More error details:

{
  "url": [
    "Error converting value \"http://aa025317d1f2.ngrok.io /api/forge/callback/designautomation?id=76m1z2sw7uQi-jtAYzYvgA&outputFileName=20210314024133_output_revit_sample_file.rvt\" to type 'System.Uri'. Path 'url', line 1, position 2376."
  ],
  "workItem": [
    "A value for the 'workItem' parameter or property was not provided."
  ]
}
Rahul Bhobe
  • 4,165
  • 4
  • 17
  • 32
sadman
  • 21
  • 3

1 Answers1

0

As suggested in the comments there is a space in the ngrok url posted to the workitem:

http://aa025317d1f2.ngrok.io /api/forge/callback/designautomation?id=76m1z2sw7uQi-jtAYzYvgA&outputFileName=20210314024133_output_revit_sample_file.rvt
Rahul Bhobe
  • 4,165
  • 4
  • 17
  • 32
  • Thank you! It is solved! Cannot believe a small space somewhere I could not even find was causing so much trouble. Thanks once again! – sadman Mar 23 '21 at 06:40