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
A TypeError is thrown when using Designer #16853
Comments
This comment is posted automatically by phpMyAdmin's error-reporting-server. |
|
I think this also affects 5.1, right? |
Yes. |
|
Would you mind providing a fix for this issue ? |
|
Hey @liviuconcioiu, I'm unable to reproduce the issue using your instructions. Can you please check whether it's database-specific or you're able to reproduce it on any database? |
|
@shucon go to https://demo.phpmyadmin.net/master-config/index.php?route=/database/designer&db=kek, open the menu and click on |
|
Hey @liviuconcioiu, I'm still unable to reproduce the issue. Maybe a video would help? |
27.05.2021_17.34.01_REC.mp4 |
|
It's very strange, I used the |
|
I've tried and it still occurs. Is affecting only Firefox. I've tried in troubleshoot mode too. |
It's not an issue on Firefox, ubuntu. I'll try windows once. |
… environment Set date to RFC3339 Used data from: phpmyadmin/phpmyadmin#16853 Signed-off-by: William Desportes <williamdes@wdes.fr>
|
I think the issue won't occur now. The code has been changed and the stack trace is old. The new change fixes the issue and should be closed. The issue was not reproducible on Windows as well. phpmyadmin/js/src/designer/database.js Line 113 in fa1a6c9
|
|
Just tested now, and the bug is still there, Firefox 93/Windows. {
"pma_version": "5.2.0-dev",
"browser_name": "FIREFOX",
"browser_version": "93.0",
"user_os": "Win",
"server_software": "nginx/1.14.2",
"user_agent_string": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0",
"locale": "en",
"configuration_storage": "disabled",
"php_version": "7.4.23",
"script_name": "index.php",
"exception_type": "js",
"exception": {
"mode": "stack",
"name": "TypeError",
"message": "can't access property \"transaction\", datastore is null",
"stack": [
{
"func": "DesignerOfflineDB</designerDB.getTransaction",
"line": "26",
"column": "5",
"context": [
" * @param {String} table",
" * @return {IDBTransaction}",
" */",
"",
" designerDB.getTransaction = function (table) {",
" return datastore.transaction([table], 'readwrite');",
" };",
" /**",
" * @param {String} table",
" * @return {IDBObjectStore}",
" */"
],
"uri": "js/dist/designer/database.js?v=5.2.0-dev",
"scriptname": "js/dist/designer/database.js"
},
{
"func": "DesignerOfflineDB</designerDB.loadAllObjects",
"line": "117",
"column": "34",
"context": [
" * @return {void}",
" */",
"",
"",
" designerDB.loadAllObjects = function (table, callback) {",
" var transaction = designerDB.getTransaction(table);",
" var cursorRequest = designerDB.getCursorRequest(transaction, table);",
" var results = [];",
"",
" transaction.oncomplete = function () {",
" callback(results);"
],
"uri": "js/dist/designer/database.js?v=5.2.0-dev",
"scriptname": "js/dist/designer/database.js"
},
{
"func": "DesignerPage.createPageList",
"line": "81",
"column": "21",
"context": [
"DesignerPage.saveTablePositions = function (positions, callback) {",
" DesignerOfflineDB.addObject('table_coords', positions, callback);",
"};",
"",
"DesignerPage.createPageList = function (db, callback) {",
" DesignerOfflineDB.loadAllObjects('pdf_pages', function (pages) {",
" var html = '';",
"",
" for (var p = 0; p < pages.length; p++) {",
" var page = pages[p];",
""
],
"uri": "js/dist/designer/page.js?v=5.2.0-dev",
"scriptname": "js/dist/designer/page.js"
},
{
"func": "DesignerMove.deletePages/<",
"line": "930",
"column": "22",
"context": [
" Functions.ajaxShowMessage(data.error, false);",
" } else {",
" Functions.ajaxRemoveMessage($msgbox);",
"",
" if (!designerTablesEnabled) {",
" DesignerPage.createPageList(db, function (options) {",
" $('#selected_page').append(options);",
" });",
" }",
"",
" var modal = DesignerMove.displayModal(data.message, Messages.strDelet//..."
],
"uri": "js/dist/designer/move.js?v=5.2.0-dev",
"scriptname": "js/dist/designer/move.js"
},
{
"func": "c",
"line": "2",
"column": "28327",
"context": [
"/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
"!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
""
],
"uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
"scriptname": "js/vendor/jquery/jquery.min.js"
},
{
"func": "fireWith",
"line": "2",
"column": "29072",
"context": [
"/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
"!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
""
],
"uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
"scriptname": "js/vendor/jquery/jquery.min.js"
},
{
"func": "l",
"line": "2",
"column": "79901",
"context": [
"/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
"!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
""
],
"uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
"scriptname": "js/vendor/jquery/jquery.min.js"
},
{
"func": "o/<",
"line": "2",
"column": "82355",
"context": [
"/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
"!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
""
],
"uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
"scriptname": "js/vendor/jquery/jquery.min.js"
}
],
"uri": "index.php?route=%2Fdatabase%2Fdesigner"
}
} |
|
Ahh, I think I understood what's happening. The request |
|
@liviuconcioiu can you please post the output of the error console log here? |
|
Can you please confirm whether the issue is happening in Private window only? I was finally able to reproduce it in a private window. Related issues: https://bugzilla.mozilla.org/show_bug.cgi?id=781982 , https://stackoverflow.com/questions/31159316/detecting-preventing-firefox-indexeddb-invalidstateerror-caused-by-private-brows |
|
If tracking/history is turned off or the tab is in a private window, indexedDB does not work for firefox. The possible solution is to either refactor the code so that it does not use indexedDB or we can show a modal saying |


Describe the bug
A TypeError is thrown when using Designer.
To Reproduce
Steps to reproduce the behavior:
Screenshots
Client configuration
Additional context
{ "pma_version": "5.2.0-dev", "browser_name": "FIREFOX", "browser_version": "90.0", "user_os": "Win", "server_software": "nginx/1.14.2", "user_agent_string": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0", "locale": "en", "configuration_storage": "disabled", "php_version": "7.4.14", "script_name": "index.php", "exception_type": "js", "exception": { "mode": "stack", "name": "TypeError", "message": "can't access property \"transaction\", db is null", "stack": [ { "func": "DesignerOfflineDB</designerDB.loadAllObjects", "line": "66", "column": "23", "context": [ " cursorRequest.onerror = designerDB.onerror;", " };", "", " designerDB.loadAllObjects = function (table, callback) {", " var db = datastore;", " var transaction = db.transaction([table], 'readwrite');", " var objStore = transaction.objectStore(table);", " var keyRange = IDBKeyRange.lowerBound(0);", " var cursorRequest = objStore.openCursor(keyRange);", " var results = [];", "" ], "uri": "js/dist/designer/database.js?v=5.2.0-dev", "scriptname": "js/dist/designer/database.js" }, { "func": "DesignerPage.createPageList", "line": "81", "column": "21", "context": [ "DesignerPage.saveTablePositions = function (positions, callback) {", " DesignerOfflineDB.addObject('table_coords', positions, callback);", "};", "", "DesignerPage.createPageList = function (db, callback) {", " DesignerOfflineDB.loadAllObjects('pdf_pages', function (pages) {", " var html = '';", "", " for (var p = 0; p < pages.length; p++) {", " var page = pages[p];", "" ], "uri": "js/dist/designer/page.js?v=5.2.0-dev", "scriptname": "js/dist/designer/page.js" }, { "func": "DesignerMove.deletePages/<", "line": "996", "column": "22", "context": [ " Functions.ajaxShowMessage(data.error, false);", " } else {", " Functions.ajaxRemoveMessage($msgbox);", "", " if (!designerTablesEnabled) {", " DesignerPage.createPageList(db, function (options) {", " $('#selected_page').append(options);", " });", " }", "", " $('<div id=\"page_delete_dialog\"></div>').append(data.message).dialog({" ], "uri": "js/dist/designer/move.js?v=5.2.0-dev", "scriptname": "js/dist/designer/move.js" }, { "func": "c", "line": "2", "column": "28327", "context": [ "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...", "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...", "" ], "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev", "scriptname": "js/vendor/jquery/jquery.min.js" }, { "func": "fireWith", "line": "2", "column": "29072", "context": [ "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...", "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...", "" ], "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev", "scriptname": "js/vendor/jquery/jquery.min.js" }, { "func": "l", "line": "2", "column": "79901", "context": [ "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...", "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...", "" ], "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev", "scriptname": "js/vendor/jquery/jquery.min.js" }, { "func": "o/<", "line": "2", "column": "82355", "context": [ "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...", "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...", "" ], "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev", "scriptname": "js/vendor/jquery/jquery.min.js" } ], "uri": "index.php?route=%2Fdatabase%2Fdesigner" } }The text was updated successfully, but these errors were encountered: