Sqlite Error: Tutorial Follow-Along Fail - Sending an authorisation code to confirm the account

I’m trying to follow along with @Hyperbytes helpful getting started tutorial.

I’m currently stuck on this video.

I’ve followed the instructions exactly as stated (rebuilt it 3 times to see if I missed something) but when I try to send an authorization email as setup in this part of the tutorial video, I get this error.

Video Tutorial Series Referred To
Sending an authorisation code to confirm the account

ERROR MESSAGE:
.returning() is not supported by sqlite3 and will not have any effect.

I’m guess maybe this is a sqlite3 error? I’m completely new to wappler, forgive me but I’d love any help on formulating a workaround to continue on the tutorial. For now I’m completely blocked.

That’s just a warning, and can be ignored.

Thanks, its super weird. I was also getting ‘OOPS! An Error Occurred’ and emails weren’t being sent, but now it appears to be working. LOL /facepalm.

HI all. I’m also very new to Wappler, and I’m following along with @Hyperbytes tutorial. I’m currently stuck at the same video as @Temoran, but I’m not getting the error message in the Wappler Console.

The user details are being added to the database, except for the Auth code - that field remains blank. In Dev Tools, I’m just seeing a 500 error.
Screenshot 2023-09-04 160051

I’ve restarted the tutorial 3 times now, with my latest attempt in wappler 6. Still no dice. Any ideas? Is there a way to track down where the error is?

Also, please let me know if I should upload any more info/code/screenshots.

Thanks

Please follow this procedure

For info, i have rechecked code in main copy and there are no errors so i need to see the exact error text which can be displayed with the above procedure

OK - thanks.
I scrapped the project and restarted it… again. If I get the error again, I’ll post it here.

Be aware, the procedure to see the real error in a server action is VERY important, without it then it it virtually impossible to debug server actions

So - after building it again, there’s no error now. I’m certain I did everything the same - a benefit of doing it so many times, I guess, and set up the debugging procedure to see the error… and it worked. I even got the email.

I’m almost upset that it’s working now. I’d have liked to learn where I was going wrong.

Thanks for your time though!

1 Like

I’m getting the same error:

2024-03-29T23:59:05.364Z server-connect:router Serving serverConnect /api/registration/register
2024-03-29T23:59:05.365Z server-connect:app Executing action step validate
2024-03-29T23:59:05.365Z server-connect:app options: {
data: [
{
name: ‘validate_1’,
value: ‘{{$_POST.email}}’,
rules: [Object],
fieldName: ‘email’
}
]
}
2024-03-29T23:59:05.371Z server-connect:app Executing action step condition
2024-03-29T23:59:05.371Z server-connect:app options: {
if: ‘{{$_POST.product_id.length()>0}}’,
then: {
steps: {
name: ‘authorized’,
module: ‘core’,
action: ‘response’,
options: [Object]
}
}
}
2024-03-29T23:59:05.371Z server-connect:app Executing action step condition
2024-03-29T23:59:05.372Z server-connect:app options: {
if: ‘{{$_POST.product_name!=$_SESSION.regcode}}’,
then: {
steps: {
name: ‘authorized_copy’,
module: ‘core’,
action: ‘response’,
options: [Object]
}
}
}
2024-03-29T23:59:05.372Z server-connect:app Executing action step passwordHash
2024-03-29T23:59:05.372Z server-connect:app options: { password: ‘{{$_POST.password}}’, algo: ‘argon2id’ }
2024-03-29T23:59:05.436Z server-connect:app Executing action step insert
2024-03-29T23:59:05.436Z server-connect:app options: {
connection: ‘db’,
sql: {
type: ‘insert’,
values: [ [Object], [Object], [Object], [Object] ],
table: ‘user’,
returning: ‘user_id’,
query: ‘insert into user (email, first_name, last_name, password) values (?, ?, ?, ?) returning user_id‘,
params: [ [Object], [Object], [Object], [Object] ]
}
}
2024-03-29T23:59:05.438Z server-connect:app Executing action step setvalue
2024-03-29T23:59:05.438Z server-connect:app options: {
value: ‘“0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9”’
}
2024-03-29T23:59:05.438Z server-connect:app Executing action step setvalue
2024-03-29T23:59:05.438Z server-connect:app options: { value: "{{saltcode.split(’,’)}}" }
2024-03-29T23:59:05.438Z server-connect:app Executing action step setvalue
2024-03-29T23:59:05.438Z server-connect:app options: { key: ‘g_randomarray’, value: ‘{{codearray.randomize()}}’ }
2024-03-29T23:59:05.438Z server-connect:app Executing action step setvalue
2024-03-29T23:59:05.438Z server-connect:app options: { key: ‘g_mycode’ }
2024-03-29T23:59:05.438Z server-connect:app Executing action step repeat
2024-03-29T23:59:05.438Z server-connect:app options: {
repeat: 6,
outputFields: ,
exec: {
steps: {
name: ‘mycode’,
module: ‘core’,
action: ‘setvalue’,
options: [Object],
meta: ,
outputType: ‘text’
}
}
}
2024-03-29T23:59:05.438Z server-connect:app Executing action step setvalue
2024-03-29T23:59:05.438Z server-connect:app options: { value: ‘{{g_mycode+randomarray($index)}}’, key: ‘g_mycode’ }
2024-03-29T23:59:05.438Z server-connect:server Got error? ReferenceError: expression is not defined

I fount the issue is using paratheses on the $index {{g_mycode}}{{randomarray($index)}} instead of square bracket on the $index {{g_mycode}}{{randomarray[$index]}}