✅ Solved: ERROR: Artboard has NO data context!

In my C++ runtime integration with Rive, I’m unable to extract or enumerate the ViewModel from my .riv file, even though the ViewModel is visibly defined and bound inside Rive.

  • In the Rive editor, my main artboard (“Mainstage” / “default output”) has a MainVM data context defined. Inside this context, I have nested Note viewmodels (np1–np12) with properties (YPos, NoteBoolean, HoldLength, etc.).

  • When running the C++ runtime, the log confirms the file contains the correct ViewModel definitions. However, the runtime consistently reports:

    ERROR: Artboard has no data context!
    Property enumeration not available from ViewModel
    
  • This indicates that the schema definitions are present in the file, but the runtime cannot locate or instantiate the bound data context on the artboard.


    My Rive file uses a two-layer ViewModel setup:

    • The MainVM serves as the root data context.

    • Inside it, I’ve nested multiple instances of a SecondVM (the child viewmodel).

    Everything is fully linked:

    • All instances are set to export.

    • Each component is instanced correctly.

    • Their properties are data-bound and mapped to the corresponding instances from the original definitions.


      When trying to access them in my C++ applicaiton it is unable to find anythinge except the surface level names i.e. artboard name but keeps giving me this ERROR: Artboard has NO data context!

      I’m exporting with RIVE_DATA_BINDING_ENABLED = 1 in CMAKE

      I’m really lost, I’m not even sure what to ask anymore 🤓 I’m merely posting to see if anyone else has had this issue recently where in C++ is unable to access any viewmodels especially if they’re nested?


  • Relevant from my debug and my approach **which isnt working**

    We might be solving the wrong problem. The fact that:
    
    - Viewmodels exist in the file ✓
    - Instances can be created ✓
    - But DataContext isn't bound ✗
    
    Suggests the .riv file is missing binding metadata. No amount of runtime manipulation will add data that doesn't exist in the file.


This has been my expereince exactly based on the above response— it simply doesnt find the binding to the artboard at all even if it discovers the names..