question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Interactive Transactions Broken as of 3.13

See original GitHub issue

Bug description

Interactive transactions stopped working for me upon updating to 3.13. This worked in 2.12

I’m getting the following error:

Error: Failed to convert napi `string` into rust type `String`
    at Object.transaction (/usr/src/app/node_modules/@prisma/client/runtime/index.js:41312:64)
    at async Proxy._transactionWithCallback (/usr/src/app/node_modules/@prisma/client/runtime/index.js:46414:21)

How to reproduce

Schema:

model Person {
  id   Int    @id @default(autoincrement())
  name String
}

Function:

router.post('/person', (req, res, next) => {

  prisma.$transaction(async (prisma) => {
    const person = await prisma.person.create({
      data: {
        name: 'A new role',
      },
    });

    // Do something else

    return person;
  }).then(person => res.status(201).json(person))
    .catch(next);
});

Expected behavior

No response

Prisma information

See in “How to reproduce” section.

Environment & setup

  • OS: Ubuntu
  • Database: SQL Server
  • Node.js version: 17

Prisma Version

3.13

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
cprietocommented, Jun 8, 2022

I am closing this issue now, it was fixed as part of the work with tracing in this PR https://github.com/prisma/prisma-engines/pull/2924

1reaction
YaakovRcommented, Jun 7, 2022

Either way, I won’t complain! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Transactions and batch queries (Reference)
Interactive transactions : pass a function that can contain user code including Prisma Client queries, non-Prisma code and other control flow to be...
Read more >
Chargeback Report: Rates, Statistics & Analysis
Midigator's annual chargeback report provides an overview of the dispute industry, complete with detailed statistics and analysis. Click here to learn more!
Read more >
What's New In Python 3.12
Pending Removal in Python 3.13¶. The following modules and APIs have been deprecated in earlier Python releases, and will be removed in Python...
Read more >
JEditor - Rich Text Editor for Jira - Version history
CollapsedExpanded3.13.10Jira Server 8.0.0 - 9.5.02022-12-12Bug fixes; ... CollapsedExpanded3.13.9Jira Data Center 8.0.0 - 9.4.12022-11-29Bug fix; ...
Read more >
Chapter 17 - Supply Discrepancy Reporting
It controls routing of web submissions and logistics transactions ... customer service help lines (e.g. the DLA Customer Interaction Center, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found