70 questions
0
votes
2
answers
57
views
jQuery Ajax $.parseJSON works on Localhost but not on server
Hello everybody and thank you in advance for your help.
I have a infinite scroll script that I have develop and working on localhost but not on my server.
The JS code look like this :
$('#load-more')....
0
votes
0
answers
193
views
How can one retrieves User's role when logged in?
I have successfully logged in a user with Parse.User.logIn(username,password). Now my WebApp needs to show a page based on the user's role.
Is this possible on the client side?
Can I get the user's ...
-1
votes
1
answer
195
views
Possibility to enable the email verification on only a part of users?
We have two types of accounts in our company. One user type (type1) are the one that we create manually via an internal UI. Now we want to give the possibility to clients to register themselves from a ...
1
vote
1
answer
599
views
Parse-server result.attributes vs get()
Been using Parse Server for about a month in our project, and it's been a fantastic addition to our tech stack. However, there is one thing that has slowed down our team a bit ; when using Parse.Query,...
0
votes
1
answer
117
views
How to initialize a ParseObject in a cloud function?
I want to generate a list of ParseObjects based on the cached data I get from Redis. Here's what I’m doing:
function parseHashtagsResponse(cachedObjects) {
var hashtags = [];
for (const ...
0
votes
1
answer
188
views
Angular9 unit-testing: Is it possible to MOCK Parse.initialize and still have reliable tests?
I want to test component how do I do it with Parse.initialize(appId,url) function inside my Angular Service?
This is the initialization part:
Parse.initialize('MY_APP_ID', 'JS_KEY');
Parse.serverURL = ...
0
votes
1
answer
2k
views
Permission denied to query class in the Parse Server with JS SDK
I created a class in my Parse Server, using the Parse Dashboard, and then I changed the Class Level Permissions to allow only one user to perform read and write operations in the documents of this ...
1
vote
2
answers
520
views
Parse: no sessionToken retrieved after initial sign up using Google oAuth
For my React Native app I am using Parse JS SDK and hosted Parse Server on Back4app.
When I try to register a new user, the user is not authenticated because the response does not return a ...
0
votes
0
answers
212
views
Trying to read value from back4app object and set it to a variable but getting error: Cannot set property 'loginName' of undefined
This is my codde, writing it to the console works fine, error occurs when assign the value to a variable.
const User = Parse.Object.extend("User");
const query = new Parse.Query(User);
...
0
votes
1
answer
1k
views
Redirect inside a getInitialProps with next.js and Parse Server
EDIT :
I set a cookie when the user is connected et store the token inside a cookie. And with the GetInitialPropsi access to the cookie and i check if the session is set to an user or not.
It seems ...
1
vote
1
answer
293
views
Using setTimeout() to Schedule pushes
Since Scheduled push is not available on Parse , I'm using setTimeout() to schedule pushes.
I'm using back4app.
// I call this cloud code
Parse.Cloud.define("pushMultiple",async (request) => {
//...
2
votes
1
answer
2k
views
Parse Server - select a few fields from included object
Is it possible to use .select(JS) / selectKeys(Android) ONLY on the object which is retrieved via .include()?
For example, Class A has a pointer to class B.
When I query for Class A, I want all the ...
0
votes
0
answers
302
views
Modify object before client receiving it on LiveQuery
I am trying to hide some fields in my cloud code for a class with blocking value to a default number in afterFind trigger.
Parse.Cloud.afterFind("Question", async (req) => {
let objs = req....
0
votes
1
answer
478
views
parse-server aggregate function returns null result
I am trying to use aggregate function on parse-server JS SDK
var pipeline = [
{ group: { objectId: '$league_id'} }
];
var query = new Parse.Query("Fixture");
return query.aggregate(...
0
votes
2
answers
204
views
How to unset nested property in `beforeSave` cloud function?
I've extended a Parse.Object. Now I want to unset a nested property before saving an object. This nested property settings is an object.
So my hook looks like this:
Parse.Cloud.beforeSave('MyObject',...
0
votes
0
answers
216
views
Restrict access to classes in Parse Server
I want to restrict certain users from accessing a class called Item in my parse database. I created a role called blockedUsers and added some users to it.
Now I am confused as to how I should modify ...
0
votes
0
answers
1k
views
Importing parse/node throws an error but works without the import
So if you download the Parse platform example nodejs example which can be found here https://github.com/parse-community/parse-server-example ,
you will notice that Parse does not get imported/required ...
1
vote
1
answer
180
views
Set StorageController in Parse-SDK-JS
i am developing an ionic app so i want to use the ionic storage module to store data on the device.
Parse is the backend so i have to tell the parse SDK that it should use the Ionic Storage. I build ...
1
vote
0
answers
182
views
How to create an aggregate query in JS where $in contains null?
This MongoDB query executes fine in the shell:
db.MyCollection.aggregate([
{
$match: {
"language": { "$in": [null, "en"]}
}
}
]).pretty()
The query returns ...
0
votes
1
answer
279
views
Parse JS SDK: Bundle Size
I'm tasked with making a js application which uses parse more efficient. It currently uses webpack v4 and the parse js sdk.
I noticed that the largest module in my bundle is the parse sdk at a ...
0
votes
1
answer
847
views
Query by date with JS in Back4App
I've got dates in my Back4App backend with times defaulting to midnight (start of day) e.g.
5 May 2019 at 00:00:00 UTC
I'm trying to use this date as a filter in my query. Without the filter, the ...
1
vote
3
answers
314
views
How do I programmatically set class level permissions in Parse?
According to the Parse Schema Javascript docs, there does not seem to be a way to set classLevelPermission using the JS api. It seems to be possible via the REST api, however. Is there a way to do it ...
1
vote
2
answers
258
views
parse server - how to extract longitude+latitude from ParseGeoPoint in cloud code
In cloud code, I want to get the longitude and latitude from a geopoint that was stored in the DB.
This is some of what I see in the logs - for afterSave function
2019-03-24T13:41:01.130Z - ...
0
votes
1
answer
306
views
When installing the Parse SDK in my react native project then it shows Can't find variable: localStorage error
When I install parse library in my existing project in react-native then it shows can't find variable: localStorage Error and break my app.
When I used install.save method then it shows the error.
...
0
votes
1
answer
191
views
Parse.com match all pointers on array in given relation column
I have Conversation classes with a members relation attribute pointing to User class.
This members attribute consists of people belong to a particular conversation.
Now I want to query if given ...
0
votes
1
answer
77
views
parse cloud code is not performing designated task and no log is created
my afterSave cloud code should run after each save, but i don't see it performing the task. also no debug info is written to a local "temp.txt" file
My parse server is running on docker container (...
0
votes
0
answers
210
views
Parse JavaScript SDK subscription using containedIn
I'm trying to retrieved chats that a particular user is part of and that works but when I'm subscribing to that query and someone starts a chat me or I start a chat with a new person, it doesn't ...
0
votes
1
answer
480
views
Parse-Server - Cannot get data from DB on a remote machine
I am using Parse-Server and I have softwares developed on C# and Swift getting data from this server remotely using the appropriated SKDs to each programming language without any problems.
But now I ...
4
votes
1
answer
386
views
convert angular 2 application to integrate able sdk
i have a angular 2 application. I was wondering if i could convert this application to an integrate-able sdk which other applications can use by adding script tags in their headers. If this is not ...
0
votes
1
answer
596
views
Parse.Query unable to find objects when called within Parse.Cloud code
I'm struggling to figure out why my queries will not work when called from Parse.Cloud triggers.
I want to define some logic after an object of particular class was saved (the class is 'Message' in ...
0
votes
1
answer
48
views
Cannot initialise Parse in javascript
I have a self hosted parse-server. However I can't seem to do a simple object save in javascript.
My server runs fine and am able to do the parse-server-example.
However, when I try to add a new ...
-1
votes
1
answer
279
views
Parse SDK for javascript how to send ping to parse server to verify connection between web client and server
i iam developing chat app with parse and need to know when the connection is closed on the client side i am trying to send pong to server put sever didn't recive ping to response with pong any help ...
3
votes
2
answers
1k
views
Login as a user in parse-server without having his password useing the master key?
It's possible to "simulate" a user using the master key? I would like this feature to test what the user can really see in the application and verify that he does not have access to some part of it ...
0
votes
1
answer
76
views
Column with different pointers Parse.Com
I have an application which uses Parse to save objects on MongoDB. On my db, I have a class which has a column that should be a pointer to make my job easier. But I have a problem, this column should ...
1
vote
2
answers
1k
views
How to use the _linkWith method on an existing user? (Parse Server)
I'm trying to authorize a user through facebook, for this I use the _linkWith method.
I can use the _linkWith method on a new user. For example, this code works:
//I get the data with Facebook SDK
...
0
votes
2
answers
317
views
Is there such a thing as ‘class bloat’ - i.e. too many classes causing inefficiencies?
E.g. let’s consider I have the following classes:
Item
ItemProperty which would include objects such as Colour and Size. There's a relation-property of the Item class which lists all of the ...
1
vote
1
answer
133
views
Parse fetches objects without any actual data
My Parse SDK seems to be doing weird things, check this out:
await Parse.User.logIn("testuser", "123asd");
this.initMap().then( correct => this.correctInit = correct);
const places = await ...
0
votes
0
answers
451
views
You cannot add or remove an unsaved Parse Object from a relation
I'm trying to add relation between my Place & User classes. But getting "You cannot add or remove an unsaved Parse Object from a relation" error. My code is like below.
var user = req.session....
1
vote
0
answers
837
views
Parse Server aggregate using match on date column
I'm using parse-server version 2.7.4 with parse (the JavaScript interface) version 1.11.1. I'm trying to execute an aggregate query using match on a date column. Here's what my pipeline looks like:
[
...
0
votes
2
answers
4k
views
$scope.$apply() not working - AngularJs
The value of isV(boolean) is not changing despite applying $scope.$apply() after the user enters the correct username and password. $scope.$digest() is also not working
app.controller('validateCtrl', ...
1
vote
0
answers
146
views
Parse JS SDK : Manually mark attribute as Dirty
I am experiencing very occasional instances where the parse js sdk does not detect that an Array attribute has changed ... and is therefore not including it in the payload on a save().
I can see ...
0
votes
1
answer
125
views
Parse cloud function - code ot executed in sequence
I have below function to update rows if meeting some condition and at the end of for loop, response include how many rows updated.Despite more than zero rows updated, response shows zero. Looking at ...
1
vote
1
answer
247
views
Parse LiveQuery Subscription always receive the old version
I have a collection of beacons that I want to show on a map. I want their positions to be synchronized between all instances of the application.
That is, when I move a beacons to another position I ...
0
votes
1
answer
829
views
Parse Server - Access to Parse Server using Javascript SDK
I'm trying to access Parse Server (back4app.com) using Javascript SDK on my web app. I have index.html file like this:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
...
0
votes
1
answer
378
views
Multiple parallel Increments on Parse.Object
Is it acceptable to perform multiple increment operations on different fields of the same object on Parse Server ?
e.g., in Cloud Code :
node.increment('totalExpense', cost);
node.increment('...
0
votes
1
answer
944
views
Parse client javascript: Query to select only objectId from pointer
If I have structure like below:
_User Structure:
objectId
username
password
name - string
Posts Structure:
objectId
postName - string
postMsg - string
postAuthor - Pointer< _User > (Pointer ...
4
votes
1
answer
157
views
angular.copy of Parse JS SDK object with DisableSingleInstance mode returns empty object
Not sure if its a bug or a misunderstanding of how things are meant to work:
disable single instance mode
Create a new parse object (or query one from the server) and populate properties
Make a copy ...
3
votes
1
answer
172
views
Property unset by CloudCode is overwritten by local Parse cache
I have a Cloud Code function which gets passed the id of an existing Parse object, manipulates and saves that object, and returns it to the client (which is implemented with the JS SDK). This ...
0
votes
1
answer
972
views
Parse-Server XMLHttpRequest failed on save with large dataset
I'm running Parse-Server v2.2.12 and am trying to run a job that pulls a huge dataset (~13k records), processes it and then saves each record to a table in my Parse db. It appears that my server is ...
1
vote
1
answer
782
views
Comparing two arrays in parse query
How do we find if any element of an array is part of another array in a query?
var followers = []; // Array of Parse User pointers
query.howTo("attending", followers); // attending is an array of ...