Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Course preview type error #517

Closed
KristofferBroberg opened this issue Apr 14, 2022 · 7 comments · Fixed by adaptlearning/adapt-cli#165
Closed

Course preview type error #517

KristofferBroberg opened this issue Apr 14, 2022 · 7 comments · Fixed by adaptlearning/adapt-cli#165
Milestone

Comments

@KristofferBroberg
Copy link
Contributor

KristofferBroberg commented Apr 14, 2022

  1. Create course
  2. Add some content
  3. Run preview

Terminal:

info adaptframework running preview for course '6257ee4841f73a4d6400eadb'
file:///Users/u0065422/adapt/node_modules/adapt-cli/lib/integration/AdaptFramework/build.js:33
        e.raw = stdout.match(/>> Error:\s(.+)\s/)[1]
                                                 ^

TypeError: Cannot read properties of null (reading '1')
    at file:///Users/u0065422/adapt/node_modules/adapt-cli/lib/integration/AdaptFramework/build.js:33:50
    at ChildProcess.exithandler (node:child_process:390:7)
    at ChildProcess.emit (node:events:520:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

MongoDB 5.0.6
Node 16.14.0
Chrome latest
OS X 10.15.7

@deltanetdan
Copy link

👍 also getting this error. Partial fix by @taylortom here. However previewing with this fix still returns an error due to stderr returning the following:

Error: read ECONNRESET at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) { errno: -54, code: 'ECONNRESET', syscall: 'read' }

@taylortom
Copy link
Collaborator

Are you guys getting this from any specific course config? I'm not able to replicate with a fresh course (similar issue here: adapt-security/adapt-authoring-ui#177)

@KristofferBroberg
Copy link
Contributor Author

Here´s my build/course/config.json

{
  "_id": "6257ee4841f73a4d6400eadc",
  "_courseId": "6257ee4841f73a4d6400eadb",
  "_type": "config",
  "createdBy": "6257ed4ceb1359603a2bd1ed",
  "updatedAt": "2022-04-14T09:50:00.683Z",
  "createdAt": "2022-04-14T09:50:00.194Z",
  "_extensions": {},
  "_enabledPlugins": [
    "adapt-contrib-boxMenu",
    "adapt-contrib-vanilla",
    "adapt-contrib-text"
  ],
  "_theme": "adapt-contrib-vanilla",
  "_menu": "adapt-contrib-boxMenu",
  "_completionCriteria": {
    "_requireContentCompleted": true,
    "_requireAssessmentCompleted": false,
    "_shouldSubmitScore": false
  },
  "_defaultLanguage": "en",
  "_defaultDirection": "ltr",
  "_accessibility": {
    "_isEnabled": true,
    "_isSkipNavigationEnabled": true,
    "_ariaLevels": {
      "_menu": 1,
      "_menuGroup": 2,
      "_menuItem": 2,
      "_page": 1,
      "_article": 2,
      "_block": 3,
      "_component": 4,
      "_componentItem": 5,
      "_notify": 1
    },
    "_options": {}
  },
  "_fixes": {
    "_imgLazyLoad": true
  },
  "screenSize": {
    "small": 520,
    "medium": 760,
    "large": 900
  },
  "_questionWeight": 1,
  "_drawer": {
    "_showEasing": "easeOutQuart",
    "_hideEasing": "easeInQuart",
    "_duration": 400
  },
  "_generateSourcemap": false,
  "_forceRouteLocking": true,
  "_disableAnimationFor": [],
  "_logging": {
    "_isEnabled": true,
    "_level": "info",
    "_console": true,
    "_warnFirstOnly": true
  },
  "_scrollingContainer": {
    "_isEnabled": true,
    "_limitToSelector": ""
  },
  "themeSettings": {},
  "_languagePicker": {
    "_isEnabled": false,
    "title": "",
    "displayTitle": "",
    "body": "",
    "_showOnCourseLoad": true,
    "_languagePickerIconClass": "icon-language-2",
    "_restoreStateOnLanguageChange": false,
    "_classes": ""
  },
  "_trickle": {
    "_completionAttribute": "_isComplete"
  },
  "tags": []
}

@deltanetdan
Copy link

Config is attached. Course created using "Add new course" in AT. AT is local install. The grunt command works OK with no errors in the stdout.

Node: v16.14.2
NPM: 8.5.0
MongoDB: 4.4.10
MacOS 11.6.5
config.json.zip

@KristofferBroberg
Copy link
Contributor Author

KristofferBroberg commented Apr 19, 2022

Don't know if this has anything to do with it..

I installed grunt and ran Grunt check-json. Got Error: Unable to read "../adapt/temp/builds/1649929868144/src/course/config.json" file (Error code: ENOENT).

There´s no course folder in src.

@taylortom
Copy link
Collaborator

The adapt-cli API expects the course folder to be in build, so shouldn't be a problem

@KristofferBroberg
Copy link
Contributor Author

OK. FYI. Did a fresh install. Completely removed MongoDB 5.x and installed 4.4. Created course. Still got this error.

@taylortom taylortom added this to the v1.0.0-beta milestone May 23, 2022
@taylortom taylortom moved this to Course build bugs in Beta issues May 24, 2022
Repository owner moved this from Course build bugs to Done in Beta issues May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants