You are not logged in.
Pages: 1
Hi,
I am trying out this example, but run into a problem.
First I compile and run RegressionTestsServer (from "27 - CrossPlatform Clients").
(I copy the crossplatform units to the SMS libraries folder)
Then I run the WebForm.sproj (from "29 - SmartMobileStudio Client") and run it in the browser.
From the browser console it looks like the app is not working: Here is (part of) the output from Firefox:
no element found DropTable:1:1
no element found 16:1:1
no element found 32:1:1
no element found 48:1:1
no element found 64:1:1
no element found 80:1:1
no element found 82:1:1
no element found 96:1:1
no element found 112:1:1
no element found 128:1:1
no element found 144:1:1
no element found 160:1:1
no element found 164:1:1
no element found 176:1:1
no element found 192:1:1
GET
XHR
http://127.0.0.1:888/root/People/16 [HTTP/1.1 404 Not Found 5ms]
GET
XHR
http://127.0.0.1:888/root/People/32 [HTTP/1.1 404 Not Found 5ms]
GET
XHR
http://127.0.0.1:888/root/People/48 [HTTP/1.1 404 Not Found 5ms]
GET
XHR
http://127.0.0.1:888/root/People/64 [HTTP/1.1 404 Not Found 5ms]
GET
XHR
http://127.0.0.1:888/root/People/80 [HTTP/1.1 404 Not Found 4ms]
GET
XHR
http://127.0.0.1:888/root/People/96 [HTTP/1.1 404 Not Found 5ms]
GET
XHR
http://127.0.0.1:888/root/People/112 [HTTP/1.1 404 Not Found 4ms]
GET
XHR
http://127.0.0.1:888/root/People/128 [HTTP/1.1 404 Not Found 4ms]
GET
XHR
http://127.0.0.1:888/root/People/144 [HTTP/1.1 404 Not Found 5ms]
GET
XHR
http://127.0.0.1:888/root/People/160 [HTTP/1.1 404 Not Found 4ms]
GET
XHR
http://127.0.0.1:888/root/People/176 [HTTP/1.1 404 Not Found 5ms]
GET
XHR
http://127.0.0.1:888/root/People/192 [HTTP/1.1 404 Not Found 5ms]
The returned json from request is
{
"errorCode":403,
"errorText":"Forbidden"
}
So looks like there is an authentication problem?
In RegressionTestsServer.dpr I could not see any code where a user "User/synopse" is created...
Any hints of what is wrong?
Thanks
Rael
(Using latest mORMot and D7)
Offline
Project14ServerHttpWrapper was working with Project14Client.sproj.
I see Project14ServerHttpWrapper calls:
aServer := TSQLRestServerFullMemory.Create(aModel,'test.json',false,true);
RegressionTestsServer project calls:
DB := TCustomServer.Create(Model);
Should it not be loading the 'test.json' file (with user info) for the authentication to be working correctly?
Offline
1) Can anyone out there reproduce the problem I have mentioned?
2) @Arnaud: I tried to use TSQLRestServerDB instead of TSQLRestServerFullMemory so I may be able to better track what happens at the server.
I create with:
DB := TCustomServer.Create(Model, ChangeFileExt(paramstr(0),'.db3')); // inherits from TSQLRestServerDB
DB.CreateMissingTables();
When I inspect the db, no default users are created. Is that only for TSQLRestServerFullMemory ?
3) I did some tracing, it looks the the "errors" are occurring in the ORMTest calls to client.delete and client.update. The initial add/read operations work ok.
Offline
Ok I found answer to 2). I need to include third parameter = true.
Offline
Take a look at the regression tests.
Every 1/16th item is deleted, then checked that it has been deleted.
So you see "no element found #:1:1" - which is expected.
If there is a real issue, there would be an explicit TEST FAILED message.
So everything sounds OK to me.
Offline
Pages: 1