Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As far as I know, the YouTubeKit with my API key in AppDelegate and SearchListRequest in the ViewController doesn't work? I set up everything correctly on Google Cloud w.r.t. YouTubeAPI. What should I do now? #89

Open
shyamalschandra opened this issue Sep 2, 2021 · 2 comments
Labels

Comments

@shyamalschandra
Copy link

Please let me know if you can help.

The output in question below.

2021-09-02 07:39:46.943671-0500 Video-Track[5611:158258] WF: === Starting WebFilter logging for process Video-Track
2021-09-02 07:39:46.943797-0500 Video-Track[5611:158258] WF: _userSettingsForUser : (null)
2021-09-02 07:39:46.943892-0500 Video-Track[5611:158258] WF: _WebFilterIsActive returning: NO
2021-09-02 07:39:47.227231-0500 Video-Track[5611:158490] [] nw_protocol_get_quic_image_block_invoke dlopen libquic failed
{
    error =     {
        code = 403;
        errors =         (
                        {
                domain = global;
                message = "Requests from this iOS client application <empty> are blocked.";
                reason = forbidden;
            }
        );
        message = "Requests from this iOS client application <empty> are blocked.";
        status = "PERMISSION_DENIED";
    };
}
unacceptableStatusCode(403)
youtubeIframeAPIReady(_:)
playerReady(_:)
player(_:didChangeState:)
player(_:didChangeState:)
player(_:didChangeQuality:)
2021-09-02 07:39:48.518544-0500 Video-Track[5611:158258] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=3 "Required client entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"MediaPlayback" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Required client entitlement is missing}>
2021-09-02 07:39:48.518653-0500 Video-Track[5611:158258] [ProcessSuspension] 0x103162360 - ProcessAssertion: Failed to acquire RBS MediaPlayback assertion 'WebKit Media Playback' for process with PID 5614, error: Error Domain=RBSAssertionErrorDomain Code=3 "Required client entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"MediaPlayback" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Required client entitlement is missing}
2021-09-02 07:39:48.519157-0500 Video-Track[5611:158258] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=3 "Required client entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"MediaPlayback" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Required client entitlement is missing}>
2021-09-02 07:39:48.519227-0500 Video-Track[5611:158258] [ProcessSuspension] 0x103162390 - ProcessAssertion: Failed to acquire RBS MediaPlayback assertion 'WebKit Media Playback' for process with PID 5611, error: Error Domain=RBSAssertionErrorDomain Code=3 "Required client entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"MediaPlayback" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Required client entitlement is missing}
player(_:didChangeState:)
player(_:didUpdateCurrentTime:)
player(_:didUpdateCurrentTime:)
player(_:didUpdateCurrentTime:)
player(_:didUpdateCurrentTime:)
player(_:didUpdateCurrentTime:)
player(_:didUpdateCurrentTime:)
player(_:didUpdateCurrentTime:)

@rinov
Copy link
Owner

rinov commented May 31, 2022

On my local code works fine, So it looks like a credential issue.

Can you check your API key settings on your GCP project, especially API key restriction and bundle id if you selected an iOS app.

YoutubeKit.shared.setAPIKey("AIza....................2Tiw")

let request = SearchListRequest(part: [.id, .snippet], searchQuery: "Apple")

YoutubeAPI.shared.send(request, queue: DispatchQueue.main) { result in
  switch result {
  case .success(let res):
      print(res)
  case  .failure(let e):
      print(e)
  }
}

@MichaelJoo
Copy link

I am facing the same issue with identical error. Have you managed to resolve the issue with "Requests from this iOS client application are blocked"? If yes, how did you do it?

I tried updating API key characteristics, but setting API key with bundle identifier resulted in random videos being retrieved instead, and setting API key with correct bundle identifier resulted in 403 error.

@rinov rinov added the question label May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants