cancel
Showing results for 
Search instead for 
Did you mean: 

SOAPUI PRO: Using Add API throws "unable to read location" error

SOLVED
Highlighted
Occasional Contributor

SOAPUI PRO: Using Add API throws "unable to read location" error

I am attempting to add an api through a json file into readyapi 3.2.5 so I can use it for test cases in soapui pro.  But I keep getting this error below in the logs and the api doesn't get added.  I've put the file in various locations  (C: drive, 😧 drive, desktop) to no avail.   What causes this error to occur and how can I resolve it?

 

Wed Jun 10 16:36:39 EDT 2020: INFO: Importing swagger C:\Program Files\SmartBear\ReadyAPI-3.2.5\memberstore.json
Wed Jun 10 16:36:39 EDT 2020: ERROR: unable to read location `C:/Program Files/SmartBear/ReadyAPI-3.2.5/memberstore.json`
Wed Jun 10 16:36:39 EDT 2020: WARN: Item [null] submitted for display, but no module could display it
Wed Jun 10 16:36:39 EDT 2020: WARN: Item [null] submitted for display, but no module could display it

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Occasional Contributor

Re: SOAPUI PRO: Using Add API throws "unable to read location" error

For reference, I sent the file to support and they could recreate the error.  The problem is that the specification needs to be fixed before I can import it.   Seems that the .net framework version we're using has an older swagger version than the .net core version.

 

Another point worth noting is that I could get more details on the errors if I changed the securityDefinition in the json file from this:

 

"securityDefinitions":{
"Token":{
"type":"apiKey",
"description":"Token Authentication",
"name":"Token",
"in":"Authentication"
} }

 

TO:

"securityDefinitions":{
"Token":{
"type":"apiKey",
"description":"Token Authentication",
"name":"Token",
"in":"header"
}}

 

So I would at least see a popup in soapUI with errors like the following instead of just the file location error:

 

attribute paths.'/Health/Status'(get).responses.200.schema is unexpected

attribute paths.'/Health/Status'(get).consumes is unexpected

attribute paths.'/Health/Status'(get).produces is unexpected attribute 

View solution in original post

8 REPLIES 8
Highlighted
Community Leader

Re: SOAPUI PRO: Using Add API throws "unable to read location" error

Hi @LunaLJG :

 

While importing Swagger json hope you have done the following changes:

 

readyapi__create__swagger 

 


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
Highlighted
Occasional Contributor

Re: SOAPUI PRO: Using Add API throws "unable to read location" error

Thank you Himanshu.  I've now tried that but it did not help the issue.    I suspect the issue is in the structure of the json file.  I have two files and both are swagger based.  One works fine for one API, but the other file doesn't.  The problem is I want to add the api of the file that isn't working for me.  I also don't want to have to extensively edit it to 'make it work' as that is not sustainable for future updates.

 

Attached are two screenshots from the json objects.  I'm not sure if you can tell anything from this high level detail or not.  I can provide a bit more detail if needed.

 

Thank you so much for your ongoing assistance.

 

 

Highlighted
Community Leader

Re: SOAPUI PRO: Using Add API throws "unable to read location" error

Thanks for sharing the information @LunaLJG , What error you are getting in SoapUI while importing the swagger file.

 

Please attach the screenshot of Error.

 


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
Highlighted
Occasional Contributor

Re: SOAPUI PRO: Using Add API throws "unable to read location" error

The only errors were the ones I mentioned:

 

Wed Jun 10 16:36:39 EDT 2020: ERROR: unable to read location `C:/Program Files/SmartBear/ReadyAPI-3.2.5/memberstore.json`
Wed Jun 10 16:36:39 EDT 2020: WARN: Item [null] submitted for display, but no module could display it

 

Let me see if I can create a stripped down json file that causes the same issue and I will post it here.  

Highlighted
Occasional Contributor

Re: SOAPUI PRO: Using Add API throws "unable to read location" error

Hi Himanshu, I've attached a dummy json file that I created that has the same error when adding the api to readyAPI.

 

ERROR: unable to read location.

 

I could not attach as json file so it is saved as txt for attachment purposes only.  Hoping this helps shed light on the root issue. 

Highlighted
Community Leader

Re: SOAPUI PRO: Using Add API throws "unable to read location" error

@LunaLJG :

 

That's strange i have tried the same file with both ReadyAPI and SoapUI, my finding is :

1. i am successfully able to load this json file. refer below screenshot swagger__soapUI

2. when i tried with readyAPI i am getting same error as you are getting don't know the reason

 

However you can raise the support ticket on this link --> support.smartbear.com 


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
Highlighted
Occasional Contributor

Re: SOAPUI PRO: Using Add API throws "unable to read location" error

Thank you Himanshu.  I've opened  Case #00439862.   I will keep this open until I have more info from them and will share it here.

Highlighted
Occasional Contributor

Re: SOAPUI PRO: Using Add API throws "unable to read location" error

For reference, I sent the file to support and they could recreate the error.  The problem is that the specification needs to be fixed before I can import it.   Seems that the .net framework version we're using has an older swagger version than the .net core version.

 

Another point worth noting is that I could get more details on the errors if I changed the securityDefinition in the json file from this:

 

"securityDefinitions":{
"Token":{
"type":"apiKey",
"description":"Token Authentication",
"name":"Token",
"in":"Authentication"
} }

 

TO:

"securityDefinitions":{
"Token":{
"type":"apiKey",
"description":"Token Authentication",
"name":"Token",
"in":"header"
}}

 

So I would at least see a popup in soapUI with errors like the following instead of just the file location error:

 

attribute paths.'/Health/Status'(get).responses.200.schema is unexpected

attribute paths.'/Health/Status'(get).consumes is unexpected

attribute paths.'/Health/Status'(get).produces is unexpected attribute 

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors