[UFront] - troubles installing the hello example

296 views
Skip to first unread message

Micha Pooh

unread,
Apr 14, 2015, 5:12:50 AM4/14/15
to haxe...@googlegroups.com
Hello

I am trying to install and build the UFront Hello example and I am running into some troubles.

Following the instructions from https://github.com/ufront/hello

I cloned the project and run haxelib install all

which gave "no such project: ufront-client"
actually this lib does not exist on lib.haxe.org

so I've changed that in client.hxml to ufront-clientds

and it installed all dependencies - ok

but "ufront build" throws some errors:

D:\Projects\Haxe\web\hello [master +0 ~1 -0]> ufront build
Build client.hxml
C:\HaxeToolkit\haxe\lib/ufront-mvc/1,0,0-rc,17/src/ufront/app/ClientJsApplicatio
n.hx:16: characters 8-27 : Class not found : pushstate.PushState
Build server.hxml
C:\HaxeToolkit\haxe\lib/ufront-easyauth/1,0,0-rc,10/src/ufront/auth/EasyAuth.hx:
16: lines 16-194 : Field asAuthHandler needed by ufront.auth.UFAuthHandler is mi
ssing
Build tasks.hxml
C:\HaxeToolkit\haxe\lib/ufront-easyauth/1,0,0-rc,10/src/ufront/auth/EasyAuth.hx:
16: lines 16-194 : Field asAuthHandler needed by ufront.auth.UFAuthHandler is mi
ssing
Build test.hxml
C:\HaxeToolkit\haxe\lib/buddy/0,17,0/buddy/BuddySuite.hx:7: characters 7-22 : Cl
ass not found : promhx.Deferred
Failed to build client.hxml, server.hxml, tasks.hxml, test.hxml


Do I have to change the ufront-mvc version perhaps?

I am using this:
ufront-clientds: [1.0.0-beta.9]
ufront-easyauth: [1.0.0-rc.10]
ufront-mail: [1.0.0-rc.4]
ufront-mvc: 1.0.0-rc.15 [1.0.0-rc.17]
ufront-orm: [1.0.0-rc.11]
ufront-ufadmin: [1.0.0-beta.11]
ufront-uftasks: [1.0.0-beta.13]
ufront: [1.0.0-rc.13]


Sorry for that long post but I am bit lost with this.

Micha Pooh

unread,
Apr 14, 2015, 7:08:05 AM4/14/15
to haxe...@googlegroups.com

ok changing ufront-client to ufront-clientds was nonsense, it's another thing..

I copied ufront-client manually in the haxe installation lib folder

Changing the ufront-mvc version to rc.15 let me build server.hxml and tasks.hxml
but i can't build client.hxml

Micha Pooh

unread,
Apr 14, 2015, 7:52:35 AM4/14/15
to haxe...@googlegroups.com
ok coping manually was nonsense as well
(still new to Haxe and learning)

so I did a:
haxelib git ufront-client git://github.com/ufront/ufront-client.git master

to add that library:

but i still get an error for client.hxml: (with ufront-mvc.rc15)
Build client.hxml
src/Client.hx:1: characters 7-37 : Class not found : ufront.app.ClientJsApplication


and when I set to ufront-mvc.rc17
Build client.hxml
C:\HaxeToolkit\haxe\lib/ufront-mvc/1,0,0-rc,17/src/ufront/app/ClientJsApplicatio
n.hx:158: characters 3-36 : Too many arguments

Confidant

unread,
Apr 15, 2015, 12:03:41 AM4/15/15
to haxe...@googlegroups.com
I feel your pain! Hopefully our friend Jason O'Neil will chime in here. :)

Micha Pooh

unread,
Apr 15, 2015, 11:24:07 AM4/15/15
to haxe...@googlegroups.com
Thx for your kind words and sympathy :)

For the moment I stick with ufront-mvc 1.0.0-rc.15 version for
my "playground" ufront appi which works for me..

I started this based on another ufront example
available on https://github.com/dstrekelj/ufront-example-HelloWorld

Mathieu Emilian

unread,
Apr 20, 2015, 4:00:22 PM4/20/15
to haxe...@googlegroups.com
Hello,

I ran into the same problem, using the git version of pushstate with ufront-mvc.rc17 worked for me

haxelib git pushstate https://github.com/jasononeil/hxpushstate.git

Micha Pooh

unread,
Apr 21, 2015, 8:27:50 AM4/21/15
to haxe...@googlegroups.com
Hi

Thank you for the hint,
I updated pushstate via haxelib to 1.1.0 and after editing the haxelib.json for ufront-client I was actually able to compile client.hxml with ufront-mvc rc.17

The EasyAuth error still persists tough when I compile the server.hxml with ufront-mvc rc.17, I have to set it back to rc.15 to compile.

The example runs now on a local neko server (ufront server) - so that's already a good thing.
(I just don't understand why it starts the server with MyName-PC:2987 and not localhost:2987)

I have some "Page not found errors" popping up in the console although the application seems to work as expected...
(some further investigations needed i guess :) )

Micha Pooh

unread,
Apr 29, 2015, 6:10:01 AM4/29/15
to haxe...@googlegroups.com
I had to use as well the latest ufront-easyauth via
haxelib git ufront-easyauth https://github.com/ufront/ufront-easyauth.git
and not the latest release... now it compiles everything with ufront-mvc 1.0.0-rc.17

Confidant

unread,
May 1, 2015, 12:48:37 PM5/1/15
to haxe...@googlegroups.com
My problem is somewhat different. I am able to run 'ufront build' but 'ufront tasks' gets me this message:

Called from Tasks.hx line 22
Called from /usr/lib/haxe/std/neko/_std/sys/db/Mysql.hx line 203
Uncaught exception - mysql.c(508) : Failed to connect to mysql server : Failed to connect on host 'localhost'

I have already edited the src/conf/mysql.json file properly and have created a database. The funny thing is that if I comment out line 22 and run 'ufront tasks' again, I get the same message. Does haxe keep a cache somewhere?

For the record I am able to connect if I create a different project and simply call:
var cnx = sys.db.Mysql.connect({ user: 'root', port: 3306, pass: 'root', host: 'localhost', database: 'ufhelloworld' });

Onat

unread,
May 4, 2015, 5:27:41 PM5/4/15
to haxe...@googlegroups.com
Hello everyone. I'm also struggling to build this example code. Even though I could build the targets except client.hxml, I broke everything so now nothing works :D

@Micha, you said you managed to get client.hxml compile using rc.17, how did you do that exactly? I updated, downgraded, used git versions tried everything. 

To summarize everything; here is what I do: 

>> cd hello
>> haxelib install all //fails because of ufront-client
>> haxelib git ufront-client https://github.com/ufront/ufront-client 
>> haxelib install all // I remove -lib ufront-client from client.hxml and rerun so dependencies are installed. I accept all installs and version settings.
>> ufront build // I put the ufront-client tag back to client.hxml and try compiling.Here is the result 

Build client.hxml

Error: Library pushstate is not installed : run 'haxelib install pushstate'

Build server.hxml

/usr/lib/haxe/lib/ufront-mvc/1,0,0-rc,15/src/ufront/app/UfrontApplication.hx:3: characters 7-34 : Class not found : thx.core.error.NullArgument

Build tasks.hxml

/usr/lib/haxe/lib/ufront-mvc/1,0,0-rc,15/src/ufront/web/context/HttpContext.hx:13: characters 7-34 : Class not found : thx.core.error.NullArgument

Build test.hxml

/usr/lib/haxe/lib/ufront-mvc/1,0,0-rc,15/src/ufront/web/Controller.hx:5: characters 7-34 : Class not found : thx.core.error.NullArgument

Failed to build client.hxml, server.hxml, tasks.hxml, test.hxml

>> haxelib install pushstate 

>> ufront build //// ufront-mvc rc15 is problematic so I switch to rc17. try with rc 17

Build client.hxml

Error: Library pushstate version 1.0.0 is not installed

Build server.hxml

/usr/lib/haxe/lib/ufront-mvc/1,0,0-rc,17/src/ufront/app/UfrontApplication.hx:3: characters 7-34 : Class not found : thx.core.error.NullArgument

Build tasks.hxml

/usr/lib/haxe/lib/ufront-mvc/1,0,0-rc,17/src/ufront/web/context/HttpContext.hx:13: characters 7-34 : Class not found : thx.core.error.NullArgument

Build test.hxml

/usr/lib/haxe/lib/ufront-mvc/1,0,0-rc,17/src/ufront/web/Controller.hx:5: characters 7-34 : Class not found : thx.core.error.NullArgument

Failed to build client.hxml, server.hxml, tasks.hxml, test.hxml

>> haxelib set pushstate 1.0.0

>> ufront build

Build client.hxml

/usr/lib/haxe/lib/ufront-mvc/1,0,0-rc,17/src/ufront/web/Controller.hx:5: characters 7-34 : Class not found : thx.core.error.NullArgument

Build server.hxml

/usr/lib/haxe/lib/ufront-mvc/1,0,0-rc,17/src/ufront/app/UfrontApplication.hx:3: characters 7-34 : Class not found : thx.core.error.NullArgument

Build tasks.hxml

/usr/lib/haxe/lib/ufront-mvc/1,0,0-rc,17/src/ufront/web/context/HttpContext.hx:13: characters 7-34 : Class not found : thx.core.error.NullArgument

Build test.hxml

/usr/lib/haxe/lib/ufront-mvc/1,0,0-rc,17/src/ufront/web/Controller.hx:5: characters 7-34 : Class not found : thx.core.error.NullArgument

Failed to build client.hxml, server.hxml, tasks.hxml, test.hxml

>> haxelib git thx.core https://github.com/onatbas/thx.core.git v19 // fponticelli renamed thx.core package to thx, so I forked the thx.core project and returned to v.19 to see if it works. 

>> ufront build // Now everything is broken :D

Build client.hxml

/usr/lib/haxe/lib/ufront-mvc/1,0,0-rc,17/src/ufront/app/ClientJsApplication.hx:158: characters 3-36 : Too many arguments

/usr/lib/haxe/lib/ufront-mvc/1,0,0-rc,17/src/ufront/app/ClientJsApplication.hx:158: characters 3-36 : Function 'init' requires arguments : ?basePath

Build server.hxml

/usr/lib/haxe/lib/ufront-easyauth/1,0,0-rc,10/src/ufront/auth/EasyAuth.hx:16: lines 16-194 : Field asAuthHandler needed by ufront.auth.UFAuthHandler is missing

Build tasks.hxml

/usr/lib/haxe/lib/ufront-easyauth/1,0,0-rc,10/src/ufront/auth/EasyAuth.hx:16: lines 16-194 : Field asAuthHandler needed by ufront.auth.UFAuthHandler is missing

Build test.hxml

/usr/lib/haxe/lib/ufront-easyauth/1,0,0-rc,10/src/ufront/auth/EasyAuth.hx:16: lines 16-194 : Field asAuthHandler needed by ufront.auth.UFAuthHandler is missing

Failed to build client.hxml, server.hxml, tasks.hxml, test.hxml


Of course I didn't wait it to work magically with a deprecated version, I just wanted to tried. So I turned back to 0.20.0 of thx.core. But there's nothing left to do. 


Jason O'Neil hear our cry :)




Micha Pooh

unread,
May 5, 2015, 6:39:34 AM5/5/15
to haxe...@googlegroups.com
Hi

Yes I can compile everything now with the following haxelib setting:

pushstate: [1.1.0]
random
: [1.4.0]
selecthxml
: [0.5.2]
thx
.core: [0.17.7] 0.20.0
tink_core
: 1.0.0-rc.7 [1.0.0-rc.8]
tink_macro
: [0.5.0]
ufront
-client: git [dev:C:\HaxeToolkit\haxe\lib/ufront-client/git]
ufront
-easyauth: 1.0.0-rc.10 git [dev:C:\HaxeToolkit\haxe\lib\ufront-easyauth\git]

ufront
-mail: [1.0.0-rc.4]
ufront
-mvc: 1.0.0-rc.15 [1.0.0-rc.17]
ufront
-orm: [1.0.0-rc.11]
ufront
-ufadmin: [1.0.0-beta.11]
ufront
-uftasks: [1.0.0-beta.13]
ufront
: [1.0.0-rc.13]

utest
: [1.3.2]

I had to set pushstate to 1.1.0 (like Mathieu suggested above) and
git versions of ufront-client, ufront-easyauth

I also set the development directory for the git versions (see the Haxelib doc - but I am not sure if this is necessary)

good luck

Onat

unread,
May 5, 2015, 6:55:15 PM5/5/15
to haxe...@googlegroups.com
it seems there's no JS client support prior to rc.17. I think you're using rc.17 without knowing it.
That being said, thx.core zips are corrupted in haxelib, all I get is "Invalid Zip Data" when I try to download it from haxelib, so I grabbed 0.17.7 as you suggested, from git.
Now everything except client.hxml compiles.

hxpushstate in github and pushstate in haxelib are different. mvc rc.17 is written using hxpushstate from git in which pushstate.init method requires two arguments. Because of that I got too many arguments errors in mvcrc.17 line 158, I simply removed the second parameter, that issue was fixed. Even after that, compilation on client fails, I get this
 Sys_error("doc/js/js.xml: No such file or directory")
I can't find what causes this. :/ Any idea? 

Micha Pooh

unread,
May 6, 2015, 6:53:07 AM5/6/15
to haxe...@googlegroups.com
it tries to create js.xml in doc/js which does not exist.
just create that directory by hand inside the doc folder.

Onat

unread,
May 6, 2015, 7:18:10 AM5/6/15
to haxe...@googlegroups.com
Huh, that was obvious, I didn't pay enough attention, it seems.
Now, I'm at where Allan is, I get the same error :/

Confidant

unread,
May 27, 2015, 6:49:24 PM5/27/15
to haxe...@googlegroups.com
I have now discerned that neko is being denied access to my MySQL database running on MAMP. If I set up my own host in MAMP I can get the PHP version of the application to respond. I still had to set up a table in the database by hand because `ufront t --setup-tables` never did run (which requires neko). Is this a MySQL configuration issue, or a permissions issue, or what?

I also discovered that one must run the `ufront b` again after changing the mysql.json file.

Confidant

unread,
May 27, 2015, 7:05:54 PM5/27/15
to haxe...@googlegroups.com
Eureka! In MAMP I visited the MySQL tab and checked "Allow network access to MySQL" and clicked save. Now the tasks can run when an argument is supplied!
Reply all
Reply to author
Forward
0 new messages