• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

share / sharedb / 13659428866 / 3
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 04 Mar 2025 05:30PM UTC
Files 39
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Mar 2025 05:28PM UTC coverage: 97.49% (+0.003%) from 97.487%
13659428866.3

push

github

web-flow
🐛 Unhandled rejection when submitting ops during hard rollback. (#692)

* 🐛 Unhandled rejection when submitting ops during hard rollback.

After doing the steps:
1. Create a doc with rich text type (or any other non irreversible type)
2. Make op submission fail
3. Now in the hard rollback we do `this._setType(null);`
4. If there is any op comming before the hard rollback `fetch` is finished, we get the error
```
Cannot submit op. Document has not been created.
```
as in the `_submit` we do:
```typescript
    if (!this.type) {
      var err = new ShareDBError(
        ERROR_CODE.ERR_DOC_DOES_NOT_EXIST,
        'Cannot submit op. Document has not been created. ' + this.collection + '.' + this.id
      );
      if (callback) return callback(err);
      return this.emit('error', err);
    }
```

We definitely do not handle this case properly. Possible solutions:
1. Just throw error whenever that happens, which is easy to implement
   and it is not really breaking. User would be then able to react on
   the error or just ignore it.
2. Store copy of cannonical snapshot in the doc itself, so that we do
   not have to do fetch for hard rollback. More difficult to implement
   and has a side effect of storing the doc twice in the memory.

* Update to call _isInHArdRollback at the top of fetch

1661 of 1874 branches covered (88.63%)

3496 of 3586 relevant lines covered (97.49%)

295.46 hits per line

Source Files on job node-22 - 13659428866.3
  • Tree
  • List 39
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 13659428866
  • 2b38f47e on github
  • Prev Job for on master (#13659411672.2)
  • Next Job for on master (#13671506362.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc