Title: Unknown error after authentication
Last modified: August 28, 2023

---

# Unknown error after authentication

 *  Resolved [owolter](https://wordpress.org/support/users/owolter/)
 * (@owolter)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/unknown-error-after-authentication/)
 * After creating an app, and setting it to Internal (Google Workspace user), I 
   grant the plugin and then get this error under “Step 2: Root directory selection”:
 *     ```wp-block-code
       The Image and video gallery from Google Drive plugin has encountered an error. Error message:
   
       Unknown error.
       ```
   
 * ![](https://www.dropbox.com/scl/fi/84t3w9q8yu5r179pofupw/Screenshot-2023-08-28-
   14.06.49.png?rlkey=kjl6raxzhakgzhd98lx29md8z&dl=1)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Marek Dědič](https://wordpress.org/support/users/marekdedic/)
 * (@marekdedic)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/unknown-error-after-authentication/#post-17017963)
 * Hi,
   please update to 2.13.6, the issue should be fixed there.
 * Thanks,
   Marek
 *  Thread Starter [owolter](https://wordpress.org/support/users/owolter/)
 * (@owolter)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/unknown-error-after-authentication/#post-17018990)
 * That fixed it. Thanks Marek!
 *  Thread Starter [owolter](https://wordpress.org/support/users/owolter/)
 * (@owolter)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/unknown-error-after-authentication/#post-17027658)
 * This is happening again, but hours after authenticating. The galleries are also
   saying “Unknown error” so it seems maybe the authentication is expiring after
   an hour or two?
 * I’m only able to fix it temporarily by revoking and granting permission. That
   only lasts a few hours.
    -  This reply was modified 2 years, 8 months ago by [owolter](https://wordpress.org/support/users/owolter/).
    -  This reply was modified 2 years, 8 months ago by [owolter](https://wordpress.org/support/users/owolter/).
 *  Thread Starter [owolter](https://wordpress.org/support/users/owolter/)
 * (@owolter)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/unknown-error-after-authentication/#post-17028017)
 * UPDATE: In debug mode, the error says “refresh token must be passed in or set
   as part of setAccessToken”
 * And here’s the stack:
 *     ```wp-block-code
       #0 /html/wp-content/plugins/skaut-google-drive-gallery/class-api-client.php(116): Sgdg\Vendor\Google\Client->fetchAccessTokenWithRefreshToken()
       #1 /html/wp-content/plugins/skaut-google-drive-gallery/class-api-client.php(134): Sgdg\API_Client::get_authorized_raw_client()
       #2 /html/wp-content/plugins/skaut-google-drive-gallery/class-api-client.php(152): Sgdg\API_Client::get_drive_client()
       #3 /html/wp-content/plugins/skaut-google-drive-gallery/class-api-facade.php(87): Sgdg\API_Client::initialize_batch()
       #4 /html/wp-content/plugins/skaut-google-drive-gallery/admin/settings-pages/basic/root-selection/class-list-ajax-endpoint.php(132): Sgdg\API_Facade::get_drive_name()
       #5 /html/wp-content/plugins/skaut-google-drive-gallery/admin/settings-pages/basic/root-selection/class-list-ajax-endpoint.php(75): Sgdg\Admin\Settings_Pages\Basic\Root_Selection\List_Ajax_Endpoint::path_ids_to_names()
       #6 /html/wp-content/plugins/skaut-google-drive-gallery/helpers/class-helpers.php(42): Sgdg\Admin\Settings_Pages\Basic\Root_Selection\List_Ajax_Endpoint::ajax_handler_body()
       #7 /html/wp-content/plugins/skaut-google-drive-gallery/admin/settings-pages/basic/root-selection/class-list-ajax-endpoint.php(53): Sgdg\Helpers::ajax_wrapper()
       #8 /html/wp-includes/class-wp-hook.php(308): Sgdg\Admin\Settings_Pages\Basic\Root_Selection\List_Ajax_Endpoint::handle_ajax()
       #9 /html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
       #10 /html/wp-includes/plugin.php(517): WP_Hook->do_action()
       #11 /html/wp-admin/admin-ajax.php(188): do_action()
       #12 {main}
       ```
   
    -  This reply was modified 2 years, 8 months ago by [owolter](https://wordpress.org/support/users/owolter/).
 *  Plugin Author [Michal Janata](https://wordpress.org/support/users/kalich5/)
 * (@kalich5)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/unknown-error-after-authentication/#post-17032049)
 * Solved by creating a new Google app and linking to the website
 *  Thread Starter [owolter](https://wordpress.org/support/users/owolter/)
 * (@owolter)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/unknown-error-after-authentication/#post-17035997)
 * I can’t imagine why that worked Michal, considering I had just made the original
   app a few days ago. But yes it solved it. Thanks.
 *  Plugin Author [Marek Dědič](https://wordpress.org/support/users/marekdedic/)
 * (@marekdedic)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/unknown-error-after-authentication/#post-17059434)
 * To be honest, we aren’t sure either. Google works in mysterious ways…

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Unknown error after authentication’ is closed to new replies.

 * ![](https://ps.w.org/skaut-google-drive-gallery/assets/icon.svg?rev=3264618)
 * [Image and video gallery from Google Drive](https://wordpress.org/plugins/skaut-google-drive-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/skaut-google-drive-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/skaut-google-drive-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/skaut-google-drive-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/skaut-google-drive-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/skaut-google-drive-gallery/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [Marek Dědič](https://wordpress.org/support/users/marekdedic/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/unknown-error-after-authentication/#post-17059434)
 * Status: resolved