Error in requesting track for url for SPTTrack object - spotify-app

I am trying to get SPTTrack object from url using Spotify iOS SKD v10beta.
Somehow, it returns an error, like :
Error Domain=com.spotify.ios-sdk Code=102 "No registered class for type 'artist'" UserInfo=0x7a644700 {NSLocalizedDescription=No registered class for type 'artist'}
Strange thing, that it has worked previously. I have found similar problem in getting the user.
What this error is related to? I have removed/added,linked spotify framework multiple times.
Ideas?

Error occurred because ObjC was not present at Other Linker Flags in frameworks/libraries/targets/project.

Related

Access package assignment approval update via MSGraph API returns HTTP 403: Only user tokens are supported

I'm trying to call Access package assignment approval update via MSGraph Beta API (Java 0.51.0-SNAPSHOT). The call fails with following error:
2022-08-26 22:32:44.239 ERROR 10208 --- [nio-9999-exec-4] global : CoreHttpProvider[sendRequestInternal] - 408Graph service exception
2022-08-26 22:32:44.239 ERROR 10208 --- [nio-9999-exec-4] global : Throwable detail: com.microsoft.graph.http.GraphServiceException: Error code:
Error message: Only user tokens are supported
PATCH https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageAssignmentApprovals/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa/steps/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb
SdkVersion : graph-java/v0.51.0
[...]
403 : Forbidden
[...]
[Some information was truncated for brevity, enable debug logging for more details]
Based on the error message can I think, that Application tokens are not really supported, but the strange thing is, that I can call Access package assignment approval get without any issue. I have of course delegated the permission EntitlementManagement.ReadWrite.All to the Application user.
I tried to reproduce the same in my environment using Graph Explorer and got the below results:
I am able to retrieve the properties of an approval object successfully like this:
GET https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageAssignmentApprovals/<id>
Response:
To update those properties, I ran the same query as you like below, and it got updated successfully:
PATCH https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageAssignmentApprovals/<id>/steps/<id>
{
"reviewResult": "Approve",
"justification": "Please approve"
}
Response:
Make sure to pass 'Request body' with the PATCH query. Please check whether you are giving correct id's or not in the query.
The <id> before /steps/ in the query is the id of accessPackageAssignmentRequest that is in PendingApproval State.
To get that id, you can run the below query:
GET https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageAssignmentRequests?$expand=requestor($expand=connectedOrganization)&$filter=(requestState eq 'PendingApproval')
Response:
The <id> after /steps/ in the query is the step id that I got by running below query:
GET https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageAssignmentApprovals/<id_that_you _got_in_above_query>
Response:
UPDATE
Please note that, you cannot update Access package assignment approval using Application permissions. Application permissions are not supported for PATCH query.
You can refer this MsDoc to confirm that like below:
So, it will only work if you login with work or school account(personal-login)

Firebase invalid api key error in react js

first, I can not gives you an API key or other information. I don't what's wrong with my code. I think my code is fine but for some reason, I get this error. what should I do now? ( Error (auth/invalid-API-key))
apiKey:process.env.REACT_APP_apiKey,
authDomain:process.env.REACT_APP_authDomain,
projectId:process.env.REACT_APP_projectId,
storageBucket:process.env.REACT_APP_storageBucket,
messagingSenderId:process.env.REACT_APP_massagingSenderId,
appId:process.env.REACT_APP_appId

How to add additional track in twilio-video?

After updating twilio-video JS SDK (from 1.x to 2.x) I have a problem in adding additional device.
This is example error message - ERROR TypeError: transceiver.sender.replaceTrack(...).then(...).finally is not a function.
If I disable this device i get new error message - ERROR Error: Uncaught (in promise): Error: The [LocalVideoTrack #5: 8da6e8e0-a9c1-473b-9916-484a17f61524] was unpublished.
And if I repeat enable device - is OK.
Below is example publishing track in share additional track method.
this.room
.localParticipant
.publishTrack(this.deviceTracks[type]);
this.deviceTrackShared[type] = true;
Below is example unpublishing track -
this.room
.localParticipant
.unpublishTrack(this.deviceTracks[type]);
this.deviceTrackShared[type] = false;
So, I fixed this issue. I lost a lot of time searching for errors in the code, but I just needed to update zone.js from 0.8.x to 0.9.x. Now it's working fine!

Difference between "drive.metadata.readonly" and "drive.readonly.metadata"

I want to ask what is the difference between DriveScopes.DRIVE_METADATA_READONLY and https://www.googleapis.com/auth/drive.readonly.metadata? In other words, what is the difference between
these two forms:
https://www.googleapis.com/auth/drive.metadata.readonly //DriveScopes.DRIVE_METADATA_READONLY
https://www.googleapis.com/auth/drive.readonly.metadata
When I was using service account for working with Drive API it takes me a long time to figure out, why my app was throwing unauthorized exception:
Uncaught exception from servlet
com.google.api.client.auth.oauth2.TokenResponseException: 403
{
"error" : "access_denied",
"error_description" : "Requested client not authorized."
}
The String constant DriveScopes.DRIVE_METADATA_READONLY was causing the exception. In which context should I use this constant?
That's clearly a mistake in the Java API client.
The API documentation states that the correct scope is :
https://www.googleapis.com/auth/drive.readonly.metadata
Whereas when you look at the latest javadoc (at the time of this answer), you get :
https://www.googleapis.com/auth/drive.metadata.readonly
You should ignore the DriveScopes constant and create your own constant, while the Google Drive team fixes this.

Adding 403 Exception view to CakePHP application

I am trying to throw a 403 (Forbidden error) in my controller. When the exception is thrown, I would like to display the associated view. I was under the assumption that if the error is one of the built in exceptions, this would be pretty easy. I throw the exception like this:
throw new ForbiddenException("You do not have permission to view this page.");
I also created a view called "error403.ctp" in the app/view/Errors folder (it already contained 400 and 500). The problem is that when the error is thrown, it displays the error400.ctp view instead. Do I have to create custom exceptions for a built in error? What am I doing wrong.
From http://book.cakephp.org/2.0/en/development/exceptions.html#exception-renderer
"For all 4xx and 5xx errors the view files error400.ctp and error500.ctp are used respectively."
So you aren't doing anything wrong, that's just the default CakePHP behavior. As to how to change it so that you can have a 403 page separate from the other 4XX errors, see CakePHP 2.0 - How to make custom error pages?
I don't have the exact cake version you are using, so I'll use links to docs of version 2.3, but it should apply to any version 2.x.
If you look at the default ExceptionRenderer construct, you get this from the description
Creates the controller to perform rendering on the error response. If the error is a CakeException it will be converted to either a 400 or a 500 code error depending on the code used to construct the error.
And clear enough, from the code of that function, all errors get mapped to that:
$method = 'error500';
if ($code >= 400 && $code < 500) {
$method = 'error400';
}
You'll have to create a custom Exception Renderer if you want to use other views. Also, keep in mind that when using debug < 1, you'll only get 500 error pages
Captures and handles all unhandled exceptions. Displays helpful framework errors when debug > 1. When debug < 1 a CakeException will render 404 or 500 errors. If an uncaught exception is thrown and it is a type that ExceptionHandler does not know about it will be treated as a 500 error.

Resources