cph-cachet / carp.sensing-flutter

CARP Mobile Sensing for Flutter, including mobile sensing framework, data backend support, and the CARP mobile sensing app.
MIT License
80 stars 28 forks source link

Can't run carp/create in generator #324

Closed LarsRefsgaard closed 1 year ago

LarsRefsgaard commented 1 year ago
➜ flutter test carp/create
00:01 +0: create                                                                                        
CARP app: CarpApp - name: CARP server at 'https://cans.cachet.dk/dev', uri: https://cans.cachet.dk/dev, studyDeploymentId: null, studyId: 75b95ab5-bfc8-48ce-a5d4-d11b228ca74b
Authenticating to the CARP Server...
Authenticated as user: 'researcher@cachet.dk'
Checking that this is a valid Smartphone Study Protocol
Reading the study protocol from file: carp/resources/protocol.json
Uploading custom protocol: StudyProtocol - name: CARP Store test protocol, ownerId: 682ac0bd-d4ab-46e1-874a-19750b884220
00:02 +0 -1: create [E]                                                                                 
  CarpServiceException: 400 Bad Request -  The protocol service serialization is not valid. Exception: Polymorphic serializer was not found for missing class discriminator ('null')
  JSON input: .....icipantData":[]},"versionTag":"2023-06-26 09:00:33.055133Z"} - POST /dev/dev/api/protocol-service
  package:carp_webservices/carp_services/carp_base_service.dart 112:5  CarpBaseService._rpc

To run this test again: /Users/larsrefsgaard/flutter/bin/cache/dart-sdk/bin/dart test /Users/larsrefsgaard/repos/carp_study_app_configurations/app_store/carp/create -p vm --plain-name 'create'
00:02 +0 -1: Some tests failed.  

https://github.com/cph-cachet/carp_study_app_configurations/blob/main/app_store/test/local_protocol_manager.dart