diff --git a/.changeset/fix-change-overflow.md b/.changeset/fix-change-overflow.md new file mode 100644 index 00000000..09b8ae9f --- /dev/null +++ b/.changeset/fix-change-overflow.md @@ -0,0 +1,5 @@ +--- +"@empirica/core": patch +--- + +Fix issue in Tajriba where the change queue could hit an out of bounds error. diff --git a/.changeset/fix-export-max-payload.md b/.changeset/fix-export-max-payload.md new file mode 100644 index 00000000..8af947ff --- /dev/null +++ b/.changeset/fix-export-max-payload.md @@ -0,0 +1,5 @@ +--- +"@empirica/core": patch +--- + +Fix `Max payload size exceeded` error when exporting data. diff --git a/go.mod b/go.mod index 06613ebf..5bd5f6f2 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/charmbracelet/lipgloss v0.5.0 github.com/cortesi/moddwatch v0.0.0-20210323234936-df014e95c743 github.com/davecgh/go-spew v1.1.1 - github.com/empiricaly/tajriba v1.4.0 + github.com/empiricaly/tajriba v1.5.0 github.com/go-playground/validator/v10 v10.11.0 github.com/jpillora/backoff v1.0.0 github.com/json-iterator/go v1.1.12 diff --git a/go.sum b/go.sum index 6bee8105..ce4501df 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= -github.com/empiricaly/tajriba v1.4.0 h1:BPXa3JcuaLGebZ18dDOxXf6PpWbJanzrJylebpxErUQ= -github.com/empiricaly/tajriba v1.4.0/go.mod h1:TqAM0iRbN78gE5vnZ1Ot6PQOidfYM5FwIdoU/UB+wrE= +github.com/empiricaly/tajriba v1.5.0 h1:ALpM3WyahVfiotLIY93ILYN5rEbdJvsLGLcTG9cG9rA= +github.com/empiricaly/tajriba v1.5.0/go.mod h1:TqAM0iRbN78gE5vnZ1Ot6PQOidfYM5FwIdoU/UB+wrE= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= diff --git a/lib/@empirica/core/src/admin/classic/api/api.ts b/lib/@empirica/core/src/admin/classic/api/api.ts index fc83e66f..da362530 100644 --- a/lib/@empirica/core/src/admin/classic/api/api.ts +++ b/lib/@empirica/core/src/admin/classic/api/api.ts @@ -146,6 +146,7 @@ export async function connect( clientName: string = "api" ): Promise { const tajriba = await Tajriba.createAndAwait(tajURL); + tajriba.useHTTP = true; if (!token) { token = await tajriba.registerService(clientName, srtoken); diff --git a/lib/@empirica/core/src/shared/tajriba_connection.ts b/lib/@empirica/core/src/shared/tajriba_connection.ts index 8d50a5fb..9c9701c5 100644 --- a/lib/@empirica/core/src/shared/tajriba_connection.ts +++ b/lib/@empirica/core/src/shared/tajriba_connection.ts @@ -1,12 +1,13 @@ import { ParticipantIdent, Tajriba } from "@empirica/tajriba"; import { bs } from "../utils/object"; +import { BehaviorSubject } from "rxjs"; export const ErrNotConnected = new Error("not connected"); export class TajribaConnection { readonly tajriba: Tajriba; private _connected = bs(false); - private _connecting = bs(true); + private _connecting: BehaviorSubject = bs(true); private _stopped = bs(false); constructor(private url: string) {