Jack-Dane / odoo-wp-plugin

Odoo WordPress Plugin
GNU General Public License v3.0
8 stars 4 forks source link

Jenkins Issue - Cannot reproduce locally #2

Closed Jack-Dane closed 1 year ago

Jack-Dane commented 1 year ago
[Thu Dec 29 18:15:35.897194 2022] [php:error] [pid 69] [client 172.18.0.1:33152] PHP Fatal error:  Uncaught TypeError: flock(): supplied resource is not a valid stream resource in /var/www/html/wp-content/plugins/odoo_conn/encryption.php:36\nStack trace:\n#0 /var/www/html/wp-content/plugins/odoo_conn/encryption.php(36): flock(Resource id #25, 3)\n#1 /var/www/html/wp-content/plugins/odoo_conn/encryption.php(101): odoo_conn\\encryption\\OdooConnEncryptionFileHandler->write_to_file('\\xA4{d7\\xBF\\xFE\\x85\\xFC\\xE7\\x047LfW\\x95...')\n#2 /var/www/html/wp-content/plugins/odoo_conn/encryption.php(69): odoo_conn\\encryption\\OdooConnEncryptionHandler->get_encryption_key()\n#3 /var/www/html/wp-content/plugins/odoo_conn/admin/api/endpoints/odoo_connections.php(54): odoo_conn\\encryption\\OdooConnEncryptionHandler->encrypt('test_api_key')\n#4 /var/www/html/wp-content/plugins/odoo_conn/admin/api/schema.php(44): odoo_conn\\admin\\api\\endpoints\\OdooConnPostOdooConnection->parse_data(Object(WP_REST_Request))\n#5 /var/www/html/wp-content/plugins/odoo_conn/admin/api/endpoints/odoo_connections.php(172): odoo_conn\\admin\\api\\endpoints\\OdooConnPostBaseSchema->request(Object(WP_REST_Request))\n#6 /var/www/html/wp-includes/rest-api/class-wp-rest-server.php(1171): odoo_conn\\admin\\api\\endpoints\\odoo_conn_create_odoo_connection(Object(WP_REST_Request))\n#7 /var/www/html/wp-includes/rest-api/class-wp-rest-server.php(1018): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/odoo_conn/v1/c...', Array, NULL)\n#8 /var/www/html/wp-includes/rest-api/class-wp-rest-server.php(442): WP_REST_Server->dispatch(Object(WP_REST_Request))\n#9 /var/www/html/wp-includes/rest-api.php(410): WP_REST_Server->serve_request('/odoo_conn/v1/c...')\n#10 /var/www/html/wp-includes/class-wp-hook.php(308): rest_api_loaded(Object(WP))\n#11 /var/www/html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)\n#12 /var/www/html/wp-includes/plugin.php(565): WP_Hook->do_action(Array)\n#13 /var/www/html/wp-includes/class-wp.php(399): do_action_ref_array('parse_request', Array)\n#14 /var/www/html/wp-includes/class-wp.php(780): WP->parse_request('')\n#15 /var/www/html/wp-includes/functions.php(1332): WP->main('')\n#16 /var/www/html/wp-blog-header.php(16): wp()\n#17 /var/www/html/index.php(17): require('/var/www/html/w...')\n#18 {main}\n  thrown in /var/www/html/wp-content/plugins/odoo_conn/encryption.php on line 36, referer: http://localhost:8000/wp-admin/admin.php?page=odoo-connection

Only happens on the first time a connection is created. After this fail, a connection can be created.