Alberto
Alberto

Reputation: 13

Chrome Extension SQLite fails since version 60: Iterator getter is not callable

When transaction.executeSQL (sql, args, function(_, result) gets called

I get:

Uncaught TypeError: Failed to execute 'executeSql' on 'SQLTransaction': Iterator getter is not callable.

the code is:

function executeSql(sql, args, resultCallback, transactionCallback) {
  DB.transaction(function(transaction) {
    transaction.executeSql(sql, args, function(_, result) {
      (resultCallback || $.noop)(result);
    });
  }, $.noop, (transactionCallback || $.noop));
}

I guess this is linked to the Chrome version 60 security fix:

[742407] Medium CVE-2017-7000: Pointer disclosure in SQLite

Do you know how can I change my code in a way to avoid the error? In the previous versions of Google Chrome it was working properly.

Upvotes: 1

Views: 2497

Answers (1)

Shubham
Shubham

Reputation: 168

transaction.executeSql(sql, [], function(_, result) {
  (resultCallback || $.noop)(result);
});

Use this this worked for me.

Upvotes: 4

Related Questions