haoide icon indicating copy to clipboard operation
haoide copied to clipboard

HTTP Method 'GET' not allowed.

Open fenixjke opened this issue 9 years ago • 9 comments

Hi, I got an error when I tried to run sync test for salesforce (command + shift + U): errorCode: METHOD_NOT_ALLOWED Time Stamp: 2016-06-21 17:36:30 message: HTTP Method 'GET' not allowed. Allowed are POST

fenixjke avatar Jun 21 '16 14:06 fenixjke

@fenixjke , how to replicate it?

xjsender avatar Jun 27 '16 16:06 xjsender

Hey, I also get the error whenever I run to run a sync test. When on test class, right-click > Haoide > Run Sync Test Happens every time.

Thanks!

superdave7380 avatar Aug 09 '16 20:08 superdave7380

@superdave7380 , yes, I also replicate this issue caused by new feature of v37.0, you can decrease the api version to avoid this problem.

xjsender avatar Aug 10 '16 00:08 xjsender

As always, thanks very much for the speedy reply.

superdave7380 avatar Aug 10 '16 12:08 superdave7380

change api_version to 35 in Setting-user。

aitiancai avatar Nov 14 '17 07:11 aitiancai

@xjsender I would like to reopen this issue because there are multiple changes after metadata API 37 (in picklist per exemple) and I do not want to switch api version each time I test a class. Furthermore, this change in the API is not going to be reverted with new releases. It will be much more easier for the end user if the feature adapt its http method with the selected api version

scolladon avatar Mar 20 '18 08:03 scolladon

I would like this issue addressed as well for all of the same reasons that @scolladon mentioned.

rspurrell avatar Oct 03 '18 15:10 rspurrell

I would like this issue addressed as well for all of the same reasons that @scolladon mentioned.

Sync test working (after your fix), but 'View Code Coverage' - not. 'No code coverage cache, please execute Run Sync Test on related test class before view code coverage'

adashko avatar Oct 25 '18 10:10 adashko

I would like this issue addressed as well for all of the same reasons that @scolladon mentioned.

Sync test working (after your fix), but 'View Code Coverage' - not. 'No code coverage cache, please execute Run Sync Test on related test class before view code coverage'

Since I pushed this fix it seems that the lines not covered are no longer being returned in the code coverage as part of the RunTestsSynchronous response. The locationsNotCovered array now contains empty entries. This is possibly a SF bug, but it may be intentional in favor of another method. Either way, the response no longer returns what HaoIDE is expecting.

After inspecting with Fiddler, I can see that this is happening in the Developer Console (DC) too. However, when viewing code coverage in the DC, a separate query for coverage is made which does return the lines covered and uncovered. Unfortunately, the response from that call is very different from what is currently handled.

If this isn't a SF bug, two updates will need to be made. One in the processor.handle_run_sync_test function to retrieve the coverage using a query, as in the DC. The other would be in the util.view_coverage function to correctly read the new JSON structure of said query.

I'll submit a SF bug report tomorrow and see what they say. However, I don't expect a speedy response. Likely they'll instruct me to use the code coverage query method.

I'll keep you posted.

rspurrell avatar Oct 30 '18 02:10 rspurrell