What can we do for the error "No error field found in JSON" (VDM:401)? - s4sdk

We try to call the API API_BUSINESS_PARTNER via our Java application. The Java implementation communicates with a SAPUI5 - Front End application, so that the data can be displayed via an app.
Through our On - Premise System it works without any problems and we also get back data. But via the application we get the error "No error field found in JSON" and the SCP - Log for ODataConnectivityUtil shows us that the respective user is not authorized.
Accordingly we tried to call an older one MMIM_MATERIAL_DATA_SRV and it works without any problems. We get the same error message in API_PRODUCT_SRV. So it doesn't seem to work with the new APIs in general.
Thank you,
best regards.
The error message
Our source code
Logging snippet

Thanks again for the support.
We have solved the problem now.
The problem is that the first metadata request is executed on the default client (client 100) although we have set "sap-client=200" in the destination configuration.
Our passwords between the clients were different, so we received an authentication error.
We suspect that the "newer" API's will not be able to access the configuration for the destination from the SCP. So it probably worked with the older ones.
One problem for us was that the Cloud SDK does not take the client from the destination configuration (for the metadata request).
The other problem was that the error message "No error field found in JSON" was misleading.
Only by the tip with "ODataConnectivityUtil", we could see our authentication error. So thanks again.

Which version of the S/4HANA Cloud SDK are you using? This might be an issue that we had in an older version. Could you update to the latest release version and give it a try again?
Details on releases can be found here:
https://sap.github.io/cloud-s4-sdk-examples/release-notes/
Hint: I would also suggest to use our virtual data model classes that we provide for invoking such OData services. You can find a blog post on this topic here: https://blogs.sap.com/2017/05/21/step-4-with-sap-s4hana-cloud-sdk-calling-an-odata-service/

Pls take a look in the S/4HANA OData log which you can find using transaction /iwfnd/error_log (put /n before it).
Then you execute the OData call to provoke the error. If you then find an entry in the OData log, it does mean that the authentication to S/4HANA was succesful. Also then you would figure out mor error details.
In case you do not find any entry, it is very likely that you are not authenticating correctly. In this case S/4HANA returns 401 and an HTML document as response payload.

Related

Custom Github connector powerapps issue

The issue actually is regarding PowerAutomate (Web version). I am trying to create a custom Github connector as the existing one lacks multiple actions that was needed for my workflow. I setup a simple Get organisation teams API and when I test this action in the builder interface of custom
connector, it works like a charm!!
However when I try to use the same action in a Flow, I encounter the following error:
'The API operation 'GetOrganizationTeams' requires the property 'body/0/parent' to be of type 'String' but is of type 'Object'.
The API documentation for Get Teams can be found here. It is a simple GET request so I don't really know why is the body parameter expected during the API operation.
I tried editing it through the Swagger docs as well, but every time it is returning the same error. Can someone guide me as to what is the exact issue and how can I resolve it?

Android Management API WebApp create/patch failed with HTTP error code 503

I have an issue with Android Management API when trying to create/patch a WebApp with an icon. If the imageData is not correct, the API returns a detailed error but if the imageData is encoded as expected, the API returns a HTTP 503 error code with message "The service is currently unavailable.". I thought this error would be transient but the REST calls seem to always fail. Any information could be helpful.
This error usually occurs when adding icons on AMAPI webApps. This issue is still pending in our Engineering’s backlog, Unfortunately, we have no shareable timeline or additional info.
If you want to stay up to date with the latest updates for Android enterprise, we suggest that you join the Android Management API mailing list to receive monthly updates and service advisories directly to your inbox.
The API has been fixed. We no longer have this problem.

googleapi: Error 500: Internal error encountered., backendError when calling Admin SDK

This is strange we have started receiving too many per day (nearly 300-500 times)
googleapi: Error 500: Internal error encountered., backendError
while calling Admin SDK Directory API. https://developers.google.com/admin-sdk/directory
Google chat support for API is removed and Facing issue with how to address the problem. Our rate limit and query calls are way in the limits. We query Admin SDK as a cronjob schedule.
Is there a way we can debug 500 errors for AdminSDK
Is there any information regarding which deployment Region of Google is more capable to handle load?
No error on console
Logs error
Contact Workspace Support or File a Bug
As DalmTo pointed out, 500 errors are usually out of your control. Especially in this case since you are calling Google's servers.
The best option to debug these errors is probably contacting support directly. You can find the corresponding contact information for your Workspace account ⁠on this page.
https://support.google.com/a/answer/1047213?hl=en
If you are able to regularly reproduce this and you think its a bug, fill out the template here:
https://issuetracker.google.com/issues/new?component=191635&template=824102
Ensure to include your code, complete reproduction steps, some evidence/statistics of the failures, and any other information you can give.
This usually happens when the Google Cloud Platform service account used for authentication was created after the in-app products.
To solve this, make a trivial edit to your in-app products in the Google Play Console. For example, add a temporary tag. Then try again to make the request and it should succeed.
By the way, the same is true for the purchases.voidedpurchases which reports an "insufficient permissions" error.

Youtube API v3 shows "Access Not Configured"

I created a Google application in the developers console, turned on "YouTube Data API v3", generated the server API key, and authorized my home and work IPs.
My website lists all videos from a Youtube channel, using the V3 API. It uses the official PHP library, passing it the server API key.
It all worked well yesterday from home, and today morning from work. Then, it suddently stoped working at 11am (GMT+1), with no action from my part, with this error:
[Google_Service_Exception] Error calling GET
https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername=xxxxxxxxxx&key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
(403) Access Not Configured. The API is not enabled for your project,
or there is a per-IP or per-Referer restriction configured on your
APIkey and the request does not match these restrictions. Please use
the Google Developers Console to update your configuration.
Note: i used less than 10 requests, out of the 50 millions allowed by day, i have a static public IP address, this part of the code was untouched.
What can i look for in order to fix that, please? I really don't know where to head for from now... Thank you.
Oooook...
Do all you have to with the API activations before you generate any keys!
Unactivating or reactivating API (like "Youtube Data") silently destroys your key validity. At least for the server one.
So the solution is, when you get the same error as me:
destroy your server key (delete it completely, do not only regenerate)
deactivate then reactivate all APIs you need
create a new server key
thank Google for the so clear error messages (optional)
Additionnaly when I opened the requested URL in browser I found that the API call returned
{"domain": "usageLimits"}
I tried the above solutions without success.
Creating a new project from scratch solved the issue
Thanks #Danra, you helped, but I add this answer because your comment is default hidden.
This solved for me....
i first followed #Ninj answer...still no change.
Then, After adding my domain urls to 'allowed referers' list,
i regenerated the key alone
it then worked like a charm !
i guess google parses allowed urls from the key string itself, not from updated settings
I got frustrated and created a new project with a new key and it worked like a charm.
Solution 1:
Create new project and enable Youtube Data v3 api and create credential.
Solution 2:
Check limit Quota in Youtube Data v3 -> Quota (in left pane) &
Increase the limits per day or request for Higher Quota
I also tried everything, but could only solve this when I created a new project, gave access to the APIs I needed, and added a new key.
I also got a "Bad Request" error and this solved it.
I also tried everything, but could only solve this when I created a new project, gave access to the APIs I needed, and added a new key.

Posting an entry from IBM Social Business Toolkit playground to on premises Connections

I am trying to post entry to community activity stream from IBM Social Business toolkit playground (Domino 9, SBT SDK version 20130602) to on premises Connections install. I am using the playground's existing JavaScript snippets but changed the communityID to match to community UUID in my Connections install. I don't have the OAuth2 configured.
I get an error "Error code:403, message:You are not authorized to perform the requested action."
I am able to get data from Connections. For example "Get Updates From A Community" -snippet works. But I am not able to post anything to Connections.
Do I need a working OAuth2 to be able to post entries or is there something else what prevents posting entries to Connections activity streams?
I tried to add a role to my account according to this post Which J2EE Role need to be enabled to post in the Activity Stream of other user but it did not seem to have an effect.
I was able to get the post entry working. The issue seems to be the browser what I used.
Posting entry did not work with Chrome but with Firefox everything worked as expected. So there seems to be some problems with Chrome and posting entries from the playground. Getting data from Connections works also with Chrome.
Are you prompted for basic authentication (either basic auth or OAuth would would work)? Or are you just accessing public communities?
Can you try to go to the authentication snippets, log in if not already (basic auth),and try the snippet again? If you still have a 403, it might be because your user doesn't have enough rights.

Resources