Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Templates values cannot be set to NULL #168

Open
fabiandepaula opened this issue Nov 8, 2023 · 6 comments
Open

HTTP Templates values cannot be set to NULL #168

fabiandepaula opened this issue Nov 8, 2023 · 6 comments

Comments

@fabiandepaula
Copy link

Describe the bug
If you assign to any of the properties of the TEMPLATE configuration you are going to have a CONFIGURATION error when you put your application in background or when you return from it.

To Reproduce
Steps to reproduce the behavior:

  1. Set a property, any, generate a new one and assign it NULL
  2. Start the service
  3. Put your APP in background
  4. See error

Expected behavior
Was a really sorprise, i didnt expect to that happened. It is very useful to start a property with a null value.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: TLC
  • OS: Android
@HarelM
Copy link
Collaborator

HarelM commented Nov 9, 2023

Some code would have helped...
Feel free to add input validation check in a PR if you would like this solved, sounds to me like something you would do accidentally, then test, and understand that it's wrong, but that might just be me :-)

@fabiandepaula
Copy link
Author

fabiandepaula commented Nov 9, 2023 via email

@HarelM
Copy link
Collaborator

HarelM commented Nov 9, 2023

I don't know what the use case is as you have not shared any code.
Regardless, you can use android studio to be able to reproduce the issue if it happens always and see which code changes need to be done in order to fix this.
Once you find a way to solve the issue feel free to open a PR.
If you need assistance in setting up a debug environment, I suggest reading the cordova/ionic manuals.

@goparklubanic
Copy link

goparklubanic commented Jan 11, 2024

I have little different case. Our back end can not fetch the posted data. Here the configuration we used:

       url: 'https://ourbackend.com/api/set',
       syncUrl: 'https://ourbackend.com/api/set',
       httpHeaders:{
           'Content-type':'application/json',
       },
       postTemplate:{
           lat: '@latitude',
           lon: '@longitude',
           dev: device.uuid,
       }

So, @HarelM , would you please tell us the equivalent or similar syntax of the configuration above in javascript fetch or curl format?
When we send the data using fetch in separate function , our back end which run laravel could retrieve the posted data.

@HarelM
Copy link
Collaborator

HarelM commented Jan 11, 2024

I can't help here, sorry, you'll need to figure it out yourself.

@goparklubanic
Copy link

It's OK. My curiosity led me to sniff packets sent from this plugin to local unsecured servers. Here are the results. Hopefully it can help anyone who will create a back end server.
cbgl-data-sniff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants