Hi @Mgoldberg62401 you should really start a new thread as @develephant ask. This is not the right thread to ask questions related to an app your building and LUA related question.
We are in a busy schedule with our app, therefore I will not be able to help you as quickly as before.
Just want to say thank you @develephant for the great plugin.
Your plugin will acelerate our development.
I hope I can contribute with the community in the future.
Hi Julio,
You are very welcome, and thank you for taking the time to let me know.
Happy New Year.
Here’s a surprise - Parse is closing down its hosted service in 12 months time!
http://blog.parse.com/announcements/moving-on/
They are providing the server software as open source and a migration tool to move your Parse database to MongoDB.
Updated Release 0.2.7
This version adds support for the Parse-Server standalone open source framework.
Added cloudAddress to Config module
Added generateInstallationId to Tools module
Updated docs to clarify Parse-Server module support
Enjoy.
I having a issue with Parse regarding user passwords. I can’t find anything on restrictions or requirements, but noticed that in the curl examples you can’t have = or @ in them http://curl.haxx.se/docs/manpage.html#–data-urlencode
I was wondering if the plugin itself had any such restrictions? If I create a user with the password: ================================================== I get an Invalid Login Parameters error when I try to login.
Hi @tap32
A couple questions.
Have you tested a password that is 32 chars or less?
Are you using the Corona Parse plugin?
Cheers
Hi @develephant, thanks for getting back. Am using your plugin “com.develephant” publisherId.
I’ve not played around with the password length. As I couldn’t see any mention of enforced restrictions, and as there were no errors at account creation, my suspicions were immediately that there was a character or two at fault.
I’m using the app as part of a study (which I hope to have finished before Parse shutsdown. The participants get no choice in the password, but the app generates one for them and stores it locally as we don’t need them to reuse the accounts.
I use the following code to generate the password. I use an array rather than a random in just to make filtering characters easier.
[lua]
local chars={[[]],[[!]],[[#]],[[$]],[[%]],[[&]],[[(]],[[)]],[[*]],[[+]],[[-]],[[.]],[[0]],[[1]],[[2]],[[3]],[[4]],[[5]],[[6]],[[7]],[[8]],[[9]],[[:]],[[;]],[[<]],[[>]],[[?]],[[A]],[[B]],[[C]],[[D]],[[E]],[[F]],[[G]],[[H]],[[I]],[[J]],[[K]],[[L]],[[M]],[[N]],[[O]],[[P]],[[Q]],[[R]],[[S]],[[T]],[[U]],[[V]],[[W]],[[X]],[[Y]],[[Z]],[[[]],[[^]],[[_]],[[`]],[[a]],[[b]],[[c]],[[d]],[[e]],[[f]],[[g]],[[h]],[[i]],[[j]],[[k]],[[l]],[[m]],[[n]],[[o]],[[p]],[[q]],[[r]],[[s]],[[t]],[[u]],[[v]],[[w]],[[x]],[[y]],[[z]],[[{]],[[|]],[[}]]}
function generatePassword()
math.randomseed(os.time()+system.getTimer())
local password={}
for i=1, 50 do
password[i]=chars[math.random(#chars)]
end
return table.concat(password,"")
end
[/lua]
You’ll notice I’ve not removed the = and @ symbols from the options. I’d noticed that generally some accounts work and some don’t. All have the same password recipe. Account creation always went fine, but when they opened the app after it had been closed and it attempts to login there were issues. The account with issues seemed to have = in their passwords, and generating a password just of = caused the same issue.
Hi,
I would recommend “parse.tools.generateInstallationId( input_seed )” to gain access to a Parse compatible ID.
http://parse.develephant.com/Tools/#generateinstallationid
Here is the full method, if you want to use it elsewhere:
[lua]
function tools.generateInstallationId( input )
assert(input, “An input string is a required parameter.”)
local crypto = require( “crypto” )
local hash = crypto.digest( crypto.md5, input )
local function h( s, e )
return string.sub(hash, s, e)
end
local id = h(1,8)…’-’…h(9,12)…’-’…h(13,16)…’-’…h(17,20)…’-’…h(21,nil)
return id
end
[/lua]
Hope that helps.
Cheers.
Fantastic, will try that instead
Hi. Great plugin! I’m currently building an app around it, however I have a question.
Is it possible to utilize Parse key filters other than WHERE and the macros? Specifically I would like to get objects using the “containedIn” query (as in get all objects whose objectId is contained within the passed table). I could make a Cloud function to do that but is there an out-of-the-box way?
Hi,
The “where” entry should have probably been called “query” but…
To answer your question, yes you can add any of the query operators in the “where” entry. The “hard” part is converting your query properly from Parse-land.
Example:
:where( { score = { ["$gt"] = 200 } } )
If you need more help let me know.
Cheers.
Hi,
I’m getting an error when I try to login to parse using twitter account auth data. The registration phase went OK, but the plug-in seems to have an issue with the callback during a subsequent login attempt. This is the code used:
parse.request( parse.User.login ) :options( params ) :response(cb)
Where params contain the twitter auth data. I get an error:
ERROR: Runtime error
16:40:37.353 ?:0: attempt to concatenate a table value
16:40:37.353 stack traceback:
16:40:37.353 ?: in function ‘response’
16:40:37.353 C:\Dev\Mobile\Projects\Dare\src\parseInteg.lua:109: in function ‘userLoginImp’
16:40:37.353 C:\Dev\Mobile\Projects\Dare\src\parseInteg.lua:123: in function ‘userLoginWithTwitter’
If I remove the response line (the last line from the code above), than the error does not show, but I have no way of processing the response. Also the debug info is not writing anything when this line is removed, so I can’t really know if a response was ever received.
If I use a regular register (mail+pass) than all goes well using the same code. Both registration and subsequent logins are going as expected. Perhaps there is some glitch in the code that processes the response from the server when it contains some nested tables?
Appreciate your help.
Regards,
Adi
Hi,
Parse is currently unsupported so I’m not sure how much I can help. I don’t have a Parse instance running.
What happens if you do this:
local req = parse.request( parse.User.login )
req:options( params )
req:response( cb )
Hi, It returns the same error.
Parse stand alone is here to stay. Probably will become the most common small scale remote DB solution now that its open. What alternatives will you use for server side?
Is the plug-in pure Lua or based on enterprise?
To clarify, the Corona Parse module is not being supported. Its available in the repo (I think) for anyone to hack on.
My priority is Corona Cloud. And remember that the Lua cloud code is a major aspect of Coronium/Corona Cloud. You won’t get this is Parse open source, nor is there any UI/front-end (last I checked).
We had discussed taking in Parse server, but it limits our abilities to grow the Corona Cloud feature-set over the future.
Hi Chris,
We’ve been using the Parse Plugin plugin for a while, and after the news of Parse shutting down, we’ve migrated to Parse Server hosted on Digital Ocean. However, we can’t seem to get any queries to run, we keep getting:
{"error":"Invalid paramater for query: include=sponsor,sub\_categories,sub\_categories.sponsor","code":102}
To be specific, this error does not occur when I don’t pass “options” in the call. Even when doing a simple user sign in such as the one in the following example:
parse.request(parse.User.login) :options({username="Chris", password="1234abcd"}) :response(cb)
The call fails with error 200, missing username. So it seems like the options aren’t being passed or encoded correctly. I think it’s also important to note that this error does not occur when using mod_parse.
So to get things straight, are you saying the Parse Plugin will no longer be supported hence it will not work with Parse Server? Or is this just a bug?
Best,
Shehab