Unhandled Rejection (TypeError): Cannot read property ‘load’ of undefined

Not all the time but sometimes I get this error message. How do I fix that? Here is my code: componentDidMount() { window.gapi.load(‘auth2’, _ => { window.gapi.auth2.init({ client_id: ‘894354405179-2pjid750mdo5un30fi8la4v89f2spcqu.apps.googleusercontent.com’, seope: ’email’, fetch_basic_profile: true }).then(() => { this.Auth = window.gapi.auth2.getAuthInstance(); this.onAuthChange(this.Auth.isSignedIn.get()) this.Auth.isSignedIn.listen(this.onAuthChange) }) }) } And the script tag: <script src=”https://apis.google.com/js/platform.js?onload=init” async defer></script>

Details

errno: 150 Cant create table in database

When im trying to start script it fails on this table creation process( INFO: AdKats role groups table not found. Attempting to add. [14:14:59 11] [AdKats] CREATE TABLE `adkats_rolegroups` ( `role_id` int(11) unsigned NOT NULL, `group_key` VARCHAR(100) NOT NULL, PRIMARY KEY (`role_id`,`group_key`), KEY `adkats_rolegroups_fk_role` (`role_id`), KEY `adkats_rolegroups_fk_command` (`group_key`), CONSTRAINT `adkats_rolegroups_fk_role` FOREIGN KEY (`role_id`) REFERENCES `adkats_roles`…

Details