Skip to content

Runtime Error: "src.js is not in the SourceMap" #1045

Closed

Description

@josephjclark

The Runtime has started throwing this weird error: R/T Error: "src.js" is not in the SourceMap.

As in:

R/T Executing expression (1 operations)
R/T Starting operation 1
R/T Add data elements to state aborted with error (4.109s)
R/T Cleaning up state. Removing keys: configuration
R/T Run complete with status: crash
R/T Error: "src.js" is not in the SourceMap.

Repro

Run this step with an empty dataclip:

fn(state => {
  state.dataElements.map(x => x);

  return state
})

state.dataElements.map() will throw a JS error. While processing that error, the Runtime will crash.

Expected Behaviour

Users should see something like this:

[R/T] ✘ TypeError: Cannot read properties of undefined (reading 'map')
    at vm:module(0):2:22
    @openfn/language-common_3.1.0/dist/index.cjs:534:12

[R/T] ✘ Error occurred at: job-1
[R/T] ✘ 2:   state.dataElements.map((x) => x);
[R/T] ✘   

In CLI it seems to work fine

Workarounds

Fix issues in your code 😂

Activity

  1. josephjclark commented on Oct 6, 2025

    @josephjclark
    CollaboratorAuthor

    Weirdly this seems to work just fine in the CLI - implying that the actual issue belongs to the engine or runtime

  2. josephjclark commented on Oct 6, 2025

    @josephjclark
    CollaboratorAuthor

    This must have been around since the sourcemapping feature came out 🙀 It's all to do with how the worker pulls the sourcemapped file out of the filemap.

  3. moved this from New Issues to Done in Coreon Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions