Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

Application 500 error then crash #22

Closed
tunniclm opened this issue Nov 29, 2016 · 0 comments
Closed

Application 500 error then crash #22

tunniclm opened this issue Nov 29, 2016 · 0 comments
Labels

Comments

@tunniclm
Copy link
Contributor

generator-swiftserver version 0.2.0

Application definition:

config.js:

{
  "appName": "test2",
  "store": "memory",
  "logger": "helium",
  "port": 8090
}

models/todo.json:

{
  "name": "todo",
  "plural": "todos",
  "classname": "Todo",
  "properties": {
    "id": {
      "type": "number",
      "id": true
    },
    "title": {
      "type": "string",
      "required": true
    },
    "completed": {
      "type": "boolean",
      "default": false
    },
    "order": {
      "type": "number"
    }
  }
}

Steps to reproduce:

$ curl -XPOST -H 'Content-Type: application/json' -d '{"title":"hi"}' http://localhost:8090/api/todos
{
  "title": "hi",
  "id": 1,
  "completed": false
}
$ curl -i -XPUT -H 'Content-Type: application/json' -d '{"completed": true}' http://localhost:8090/api/todo/1
HTTP/1.1 500 Server Error
Date: Tue, 29 Nov 2016 18:28:00 GMT
Content-Length: 0
Connection: Keep-Alive
Keep-Alive: timeout=60, max=99
$ curl http://localhost:8090/api/todo/1
curl: (52) Empty reply from server

Server crashed:

assertion failed: file /home/vagrant/reltest/repos/test2/Packages/GeneratedSwiftServer-0.2.0/Sources/Model.swift, line 178
Current stack trace:
0    libswiftCore.so                    0x00007f217c19c300 swift_reportError + 117
1    libswiftCore.so                    0x00007f217c1ad630 _swift_stdlib_reportFatalErrorInFile + 103
2    libswiftCore.so                    0x00007f217c1539f3 <unavailable> + 0
3    libswiftCore.so                    0x00007f217bfbd1c3 <unavailable> + 0
4    libswiftCore.so                    0x00007f217c153960 <unavailable> + 0
5    libswiftCore.so                    0x00007f217bfbd5ec <unavailable> + 0
6    libswiftCore.so                    0x00007f217c0ffae9 <unavailable> + 0
7    libswiftCore.so                    0x00007f217bfbd1c3 <unavailable> + 0
8    libswiftCore.so                    0x00007f217bfbce40 _assertionFailed(StaticString, String, StaticString, UInt, flags : UInt32) -> Never + 144
9    test2                              0x0000000000539810 <unavailable> + 0
...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants