<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Shephertz Community - Recent questions in JavaScript</title>
<link>http://forum.shephertz.com/?qa=questions/products/app42-cloud-api-baas/javascript</link>
<description>Powered by Question2Answer</description>
<item>
<title>CORS PROBLEM</title>
<link>http://forum.shephertz.com/?qa=11597/cors-problem</link>
<description>&lt;p&gt;
	It looks that this issue not resolved. I still can't update my data.&lt;br&gt;
	ERROR:&lt;/p&gt;
&lt;p&gt;
	&lt;span class=&quot;message-body-wrapper&quot;&gt;&lt;span class=&quot;message-flex-body&quot;&gt;&lt;span class=&quot;message-body devtools-monospace&quot;&gt;&lt;span class=&quot;objectBox objectBox-string&quot;&gt;Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at &lt;a class=&quot;url&quot; href=&quot;https://api.shephertz.com/cloud/1.0/storage/updateByDocId/dbName/TEST/collectionName/foo/docId/6033bf71e4b07fff31942220?version=1.0&quot; rel=&quot;noopener noreferrer nofollow&quot; target=&quot;_blank&quot; title=&quot;https://api.shephertz.com/cloud/1.0/storage/updateByDocId/dbName/TEST/collectionName/foo/docId/6033bf71e4b07fff31942220?version=1.0&quot;&gt;https://api.shephertz.com/cloud/1.0/storage/updateByDocId/dbName/TEST/collectionName/foo/docId/6033bf71e4b07fff31942220?version=1.0&lt;/a&gt;. (Reason: Did not find method in CORS header ‘Access-Control-Allow-Methods’).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=11597/cors-problem</guid>
<pubDate>Mon, 22 Feb 2021 14:33:51 +0000</pubDate>
</item>
<item>
<title>Is it possible to integrate App42 SDK with Angular6 and above? if yes How can I integrate.</title>
<link>http://forum.shephertz.com/?qa=11590/possible-integrate-app42-with-angular6-above-yes-integrate</link>
<description></description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=11590/possible-integrate-app42-with-angular6-above-yes-integrate</guid>
<pubDate>Mon, 07 Sep 2020 08:23:10 +0000</pubDate>
</item>
<item>
<title>works on localhost but not on live server</title>
<link>http://forum.shephertz.com/?qa=11577/works-on-localhost-but-not-on-live-server</link>
<description>&lt;p&gt;
	Im getting an error whenever i try to initialize the api. the script works locally but not on my live server. how do i fix?&lt;/p&gt;
&lt;p&gt;
	&lt;a rel=&quot;nofollow&quot; href=&quot;http://prntscr.com/s76uzr&quot;&gt;http://prntscr.com/s76uzr&lt;/a&gt;&lt;/p&gt;</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=11577/works-on-localhost-but-not-on-live-server</guid>
<pubDate>Tue, 28 Apr 2020 07:05:05 +0000</pubDate>
</item>
<item>
<title>The GET and POST request for storing the user score is getting sent continuously. How to stop it?</title>
<link>http://forum.shephertz.com/?qa=11469/request-storing-user-score-getting-sent-continuously-stop</link>
<description>The GET and POST request for storing the user score is getting sent continuously. How to stop it? The multiple POST score requests are flooding the score table like anything for the same user. How can I send a single POST request to save the user score and get the Top 10 user data from the leaderboard. 1 POST request and 1 GET request respectively</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=11469/request-storing-user-score-getting-sent-continuously-stop</guid>
<pubDate>Tue, 28 May 2019 06:54:48 +0000</pubDate>
</item>
<item>
<title>Node sdk still works</title>
<link>http://forum.shephertz.com/?qa=11461/node-sdk-still-works</link>
<description>Hi,

 

I  just came across you Node.js Sdk. I have few questions about it.

 

1. Do you still support this Node.js sdk  ?

2. If yes, Its last updated 4 years back.

3. It does not contain the Leaderboard service ?

4. Is there any updated version or latest for Node.js?

 

Kindly revert back as soon as possible.</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=11461/node-sdk-still-works</guid>
<pubDate>Wed, 17 Apr 2019 10:50:41 +0000</pubDate>
</item>
<item>
<title>Multiple Score using same name on Leaderboard</title>
<link>http://forum.shephertz.com/?qa=11386/multiple-score-using-same-name-on-leaderboard</link>
<description>&lt;p&gt;
	It is possible to create a leaderboard that does not replace the highest score of the same name such that :&lt;/p&gt;
&lt;p&gt;
	1. ABC 1000&lt;/p&gt;
&lt;p&gt;
	2. EFG 999&lt;/p&gt;
&lt;p&gt;
	3. ABC 998&lt;/p&gt;
&lt;p&gt;
	4. EFG 222&lt;/p&gt;
&lt;p&gt;
	.&lt;/p&gt;
&lt;p&gt;
	.&lt;/p&gt;
&lt;p&gt;
	.&lt;/p&gt;
&lt;p&gt;
	100. EFG 20&lt;/p&gt;
&lt;p&gt;
	Something along this line &lt;span style=&quot;background-color: rgb(246, 213, 217);&quot;&gt;where&amp;nbsp;&lt;/span&gt;we only update based on the top 100 scores.&lt;/p&gt;
&lt;p&gt;
	So it is possible to still create the no.100 in ranking score value as well ?&lt;/p&gt;</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=11386/multiple-score-using-same-name-on-leaderboard</guid>
<pubDate>Sat, 29 Dec 2018 09:11:45 +0000</pubDate>
</item>
<item>
<title>European server is down..</title>
<link>http://forum.shephertz.com/?qa=11305/european-server-is-down</link>
<description>Hi,

 

On Firefox I see the following error in the console

&quot;Firefox can’t establish a connection to the server at wss://eu.appwarp.shephertz.com:12347/.&quot;

 

I copied paste the url &lt;a href=&quot;https://eu.appwarp.shephertz.com:12347/&quot; rel=&quot;nofollow&quot;&gt;https://eu.appwarp.shephertz.com:12347/&lt;/a&gt; to the browser and I got a time out. 

Apparently, the server is down, but, why doesn't your load balance send the request to another server?

My web users can not longer connect to your server, but, surprisingly,  my mobile users can.

 

I hope this is something that you will fix it soon. 

 

Thank you</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=11305/european-server-is-down</guid>
<pubDate>Thu, 20 Sep 2018 19:47:17 +0000</pubDate>
</item>
<item>
<title>What's the best way to implement the App42 javascript sdk in an app using webpack?</title>
<link>http://forum.shephertz.com/?qa=11297/whats-best-implement-the-app42-javascript-sdk-using-webpack</link>
<description>I'm using webpack for modularity in my app (currently just a Redux backend). The App42 api appears to not be designed to be imported into an app using webpack.</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=11297/whats-best-implement-the-app42-javascript-sdk-using-webpack</guid>
<pubDate>Mon, 10 Sep 2018 22:59:35 +0000</pubDate>
</item>
<item>
<title>How do I update the room properties</title>
<link>http://forum.shephertz.com/?qa=11236/how-do-i-update-the-room-properties</link>
<description>&lt;p&gt;
	Hi,&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	I really have a hard time understanding the instructions for the Javascript. I want to update the room properties and I do not know how to call the method.&lt;/p&gt;
&lt;p&gt;
	In the method&lt;/p&gt;
&lt;p&gt;
	&lt;span&gt;&lt;span&gt;updateRoomProperties(roomID,&amp;nbsp;tableProperties,&amp;nbsp;removeArray);&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&lt;span&gt;&lt;span&gt;roomID is a string,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span&gt;&lt;span&gt;but what is the tableProperties? It should have the json format, but is it a string or a JSON object?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span&gt;&lt;span&gt;If I do not want to remove any property, what should I set the value of removeArray to? empty string or null?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&lt;span&gt;&lt;span&gt;Thank you&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=11236/how-do-i-update-the-room-properties</guid>
<pubDate>Wed, 25 Jul 2018 07:51:06 +0000</pubDate>
</item>
<item>
<title>how to send multiple files to shehertz storage?</title>
<link>http://forum.shephertz.com/?qa=11076/how-to-send-multiple-files-to-shehertz-storage</link>
<description>I want to send multiple files up to 10kb each into the storage, but I do not know how. Can you help me with this?

I would like to do it in node.js, but if it has some easier mechanism it would be of great help, because I have little time.</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=11076/how-to-send-multiple-files-to-shehertz-storage</guid>
<pubDate>Tue, 24 Apr 2018 12:38:06 +0000</pubDate>
</item>
<item>
<title>Getting &quot;Cross-Origin Request Blocked&quot; for StorageService.updateDocumentByDocId API call</title>
<link>http://forum.shephertz.com/?qa=10899/getting-request-blocked-storageservice-updatedocumentbydocid</link>
<description>Hi,&lt;br /&gt;
&lt;br /&gt;
We are consuming StorageService to manage (add/update/delete) json documents in our STEMergy database. GET/POST calls on StorageService are working fine without any issues, however update calls that use &amp;quot;PUT&amp;quot; method are being blocked by CORS. Error in the that we see in the developer tools debugger is below:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://api.shephertz.com/cloud/1.0/storage/updateByDocId/dbName/&quot; rel=&quot;nofollow&quot;&gt;https://api.shephertz.com/cloud/1.0/storage/updateByDocId/dbName/&lt;/a&gt;&amp;lt;ourdbname//collectionName/AmazonKits/docId/&amp;lt;docid here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at &lt;a href=&quot;https://api.shephertz.com/cloud/1.0/storage/updateByDocId/dbName/&quot; rel=&quot;nofollow&quot;&gt;https://api.shephertz.com/cloud/1.0/storage/updateByDocId/dbName/&lt;/a&gt;&amp;lt;dbname&amp;gt;/collectionName/AmazonKits/docId/&amp;lt;docid&amp;gt;?version=1.0. (Reason: Did not find method in CORS header ‘Access-Control-Allow-Methods’).&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
This app is browser based app deployed in a apache web server and javascript SDK is being used to communicate with server.&lt;br /&gt;
&lt;br /&gt;
Appreciate any help here.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;br /&gt;
Gyanam</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=10899/getting-request-blocked-storageservice-updatedocumentbydocid</guid>
<pubDate>Sat, 06 Jan 2018 02:00:21 +0000</pubDate>
</item>
<item>
<title>How to get more than 100 results from leaderbord on js</title>
<link>http://forum.shephertz.com/?qa=10836/how-to-get-more-than-100-results-from-leaderbord-on-js</link>
<description>&lt;p&gt;
	Good day. Few days ago I find out how to get more than 100 results from leaderboard on php with&amp;nbsp;&lt;span style=&quot;background-color: rgb(35, 37, 37); color: rgb(255, 198, 109); font-family: &amp;quot;DejaVu Sans Mono&amp;quot;; font-size: 11.3pt;&quot;&gt;getTopNRankings&lt;/span&gt;&amp;nbsp;method and offsets. Thank you for your help. But I faced this problem again. Now I need to fetch more than 100 results on frontent. ~5000 results. I have to do this on javascript. Hope to get an assistance from you.&lt;/p&gt;</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=10836/how-to-get-more-than-100-results-from-leaderbord-on-js</guid>
<pubDate>Mon, 04 Dec 2017 14:10:45 +0000</pubDate>
</item>
<item>
<title>Can not fetch data from getTopRankingsByDate function</title>
<link>http://forum.shephertz.com/?qa=10764/can-not-fetch-data-from-gettoprankingsbydate-function</link>
<description>&lt;p&gt;
	&lt;span style=&quot;color: rgb(51, 51, 51); font-family: Helvetica, Arial, Sens-serif; background-color: rgb(250, 250, 250);&quot;&gt;it doesn't matter. i changed query&lt;/span&gt;&lt;br style=&quot;color: rgb(51, 51, 51); font-family: Helvetica, Arial, Sens-serif; background-color: rgb(250, 250, 250);&quot;&gt;
	&lt;a href=&quot;https://api.shephertz.com/cloud/1.0/game/scoreboard/Looney%20Earth%20Daily/ranking/2017-09-15T00:15:11.0Z/2017-09-15T14:54:40.747Z?version=1.0&quot; rel=&quot;nofollow&quot; style=&quot;text-decoration-line: none; color: rgb(42, 169, 224); font-family: Helvetica, Arial, Sens-serif; background-color: rgb(250, 250, 250);&quot;&gt;https://api.shephertz.com/cloud/1.0/game/scoreboard/Looney%20Earth%20Daily/ranking/2017-09-15T00:15:11.0Z/2017-09-15T14:54:40.747Z?version=1.0&lt;/a&gt;&lt;br style=&quot;color: rgb(51, 51, 51); font-family: Helvetica, Arial, Sens-serif; background-color: rgb(250, 250, 250);&quot;&gt;
	&lt;span style=&quot;color: rgb(51, 51, 51); font-family: Helvetica, Arial, Sens-serif; background-color: rgb(250, 250, 250);&quot;&gt;still same error&lt;/span&gt;&lt;br style=&quot;color: rgb(51, 51, 51); font-family: Helvetica, Arial, Sens-serif; background-color: rgb(250, 250, 250);&quot;&gt;
	&lt;span style=&quot;color: rgb(51, 51, 51); font-family: Helvetica, Arial, Sens-serif; background-color: rgb(250, 250, 250);&quot;&gt;and as I mentioned above week query works good, despite the fact that it starts on Monday 11th of Sep and finishes on Monday 18th of Sep&lt;/span&gt;&lt;br style=&quot;color: rgb(51, 51, 51); font-family: Helvetica, Arial, Sens-serif; background-color: rgb(250, 250, 250);&quot;&gt;
	&lt;a href=&quot;https://api.shephertz.com/cloud/1.0/game/scoreboard/Looney%20Earth%20Weekly/ranking/2017-09-11T00:15:11.0Z/2017-09-18T00:15:10.999Z?version=1.0&quot; rel=&quot;nofollow&quot; style=&quot;text-decoration-line: none; color: rgb(42, 169, 224); font-family: Helvetica, Arial, Sens-serif; background-color: rgb(250, 250, 250);&quot;&gt;https://api.shephertz.com/cloud/1.0/game/scoreboard/Looney%20Earth%20Weekly/ranking/2017-09-11T00:15:11.0Z/2017-09-18T00:15:10.999Z?version=1.0&lt;/a&gt;&lt;/p&gt;</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=10764/can-not-fetch-data-from-gettoprankingsbydate-function</guid>
<pubDate>Mon, 18 Sep 2017 14:47:31 +0000</pubDate>
</item>
<item>
<title>Can not fetch data from getTopRankingsByDate function</title>
<link>http://forum.shephertz.com/?qa=10757/can-not-fetch-data-from-gettoprankingsbydate-function</link>
<description>&lt;p&gt;
	Hello,&lt;/p&gt;
&lt;p&gt;
	Same thing again. Trying to fetch data from&lt;span style=&quot;color:#000000;&quot;&gt;&amp;nbsp;&quot;&lt;span style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;, monospace; font-size: 11px; white-space: pre-wrap;&quot;&gt;Looney%20Earth%20Daily/ranking/2017-09-15T00:15:11.0Z/2017-09-16T00:15:10.999Z&quot; but again I get 404...&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;a href=&quot;http://joxi.ru/l2ZKBdzh8Nn3PA&quot; rel=&quot;nofollow&quot;&gt;http://joxi.ru/l2ZKBdzh8Nn3PA&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	As you can see there is 1 result in the table. Function I use&amp;nbsp;getTopRankingsByDate&lt;/p&gt;
&lt;p&gt;
	And again weekly results from&amp;nbsp;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: &amp;quot;dejavu sans mono&amp;quot;, monospace; font-size: 11px; white-space: pre-wrap;&quot;&gt;Looney Earth Weekly&quot; has been fetched correctly with the same function&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	Thank you&lt;/p&gt;</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=10757/can-not-fetch-data-from-gettoprankingsbydate-function</guid>
<pubDate>Fri, 15 Sep 2017 13:04:26 +0000</pubDate>
</item>
<item>
<title>Can not fetch data from getTopRankingsByDate function</title>
<link>http://forum.shephertz.com/?qa=10746/can-not-fetch-data-from-gettoprankingsbydate-function</link>
<description>&lt;p&gt;
	Hello,&lt;/p&gt;
&lt;p&gt;
	I have a problem with&amp;nbsp;&lt;span style=&quot;background-color: rgb(224, 238, 248); color: rgb(31, 31, 31); font-family: droid_sansregular; font-size: 13px;&quot;&gt;getTopRankingsByDate&lt;/span&gt;&amp;nbsp;function.&lt;/p&gt;
&lt;p&gt;
	I'm sending a request to fetch data for 1 day with following options:&lt;/p&gt;
&lt;p&gt;
	&lt;a href=&quot;https://api.shephertz.com/cloud/1.0/game/scoreboard/Looney%20Earth%20Alltime/ranking/2017-09-11T00:15:11.0Z/2017-09-12T00:15:10.999Z?version=1.0&quot; rel=&quot;nofollow&quot;&gt;https://api.shephertz.com/cloud/1.0/game/scoreboard/Looney%20Earth%20Alltime/ranking/2017-09-11T00:15:11.0Z/2017-09-12T00:15:10.999Z?version=1.0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	and getting back 404 error, but I know exactly that I have data in this period. What am I doing wrong?&lt;/p&gt;
&lt;p&gt;
	P.S. I need data to be fetched precisely from 00:15:10 current day to 00:15:10 next day.&lt;/p&gt;
&lt;p&gt;
	E.g. This monthly query works perfectly&lt;/p&gt;
&lt;p&gt;
	&lt;a href=&quot;https://api.shephertz.com/cloud/1.0/game/scoreboard/Looney%20Moon%20Alltime/ranking/2017-09-01T00:15:11.0Z/2017-10-01T00:15:10.999Z?version=1.0&quot; rel=&quot;nofollow&quot;&gt;https://api.shephertz.com/cloud/1.0/game/scoreboard/Looney%20Moon%20Alltime/ranking/2017-09-01T00:15:11.0Z/2017-10-01T00:15:10.999Z?version=1.0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	This line I can not fetch: &lt;a href=&quot;http://joxi.ru/krDgN3at0LQYMA&quot; rel=&quot;nofollow&quot;&gt;http://joxi.ru/krDgN3at0LQYMA&lt;/a&gt;&lt;/p&gt;</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=10746/can-not-fetch-data-from-gettoprankingsbydate-function</guid>
<pubDate>Mon, 11 Sep 2017 09:10:59 +0000</pubDate>
</item>
<item>
<title>How many games can I create maximum?</title>
<link>http://forum.shephertz.com/?qa=10693/how-many-games-can-i-create-maximum</link>
<description></description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=10693/how-many-games-can-i-create-maximum</guid>
<pubDate>Fri, 18 Aug 2017 11:40:11 +0000</pubDate>
</item>
<item>
<title>Do you have delete game function in the leadersboard service?</title>
<link>http://forum.shephertz.com/?qa=10691/do-you-have-delete-game-function-in-the-leadersboard-service</link>
<description>&lt;p&gt;
	Hi, I see the function &quot;&lt;a rel=&quot;nofollow&quot; href=&quot;http://api.shephertz.com/app42-docs/leaderboard-service/#create-game&quot; style=&quot;font-size: 13px; margin: 0px; padding: 0px; outline: 0px; border: none; text-decoration-line: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; color: rgb(33, 103, 192); text-size-adjust: auto !important;&quot;&gt;Create Game&lt;/a&gt;&quot; in the Leadersboard Service List, but I also need to remove game in particular time. I can't find any delete game or remove game functions. Do you have ones? How can I use them?&lt;/p&gt;</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=10691/do-you-have-delete-game-function-in-the-leadersboard-service</guid>
<pubDate>Thu, 17 Aug 2017 08:07:23 +0000</pubDate>
</item>
<item>
<title>addOrUpdateKeys request blocked by firefox</title>
<link>http://forum.shephertz.com/?qa=10682/addorupdatekeys-request-blocked-by-firefox</link>
<description>&lt;p&gt;
	Using the JS framework,&amp;nbsp; I want to update a value in a stored json document.&lt;/p&gt;
&lt;p&gt;
	I have the addOrUpdateKeys call filtered/blocked by firefox. (same origin policy?), but this is working on Chrome...&lt;/p&gt;
&lt;p&gt;
	whereas calls for retrieve date and insert in collection are good.&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	Any idea for the resolution of this ?&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;pre class=&quot;brush:jscript;&quot;&gt;
                        var TAG = new Object();
			TAG.user = sessionStorage.getItem('pseudo');
			TAG.userId = sessionStorage.getItem('sessionId');
		
			var promiseReservation = new Promise( function(resolve, reject) {
				var storageService  = new App42Storage();	
				var keys = new Object();
				keys.TAG = TAG;
				storageService.addOrUpdateKeys(dbName, collectionName, wishId, keys,
				{
					success: function(object) {
						console.log(&quot;ok&quot;);
						resolve();
					},
					error: function(error) {
						reject(&quot;huhu&quot;);
					}
			
				});				
			});&lt;/pre&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=10682/addorupdatekeys-request-blocked-by-firefox</guid>
<pubDate>Thu, 10 Aug 2017 12:16:38 +0000</pubDate>
</item>
<item>
<title>User Service - Reset Password</title>
<link>http://forum.shephertz.com/?qa=10312/user-service-reset-password</link>
<description>Hello, I have big problems with password reset procedure.

Yesterday when I Call resetUserPassword function I get an error immediatly : Internal Server Error please try again

Today I do not get this message

but when I open the link in the email 

i get the message &quot;INVALID REQUEST&quot;

 

Can anyone help me</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=10312/user-service-reset-password</guid>
<pubDate>Fri, 24 Mar 2017 11:23:40 +0000</pubDate>
</item>
<item>
<title>UserService 1401 UnAuthorized Access Error</title>
<link>http://forum.shephertz.com/?qa=10250/userservice-1401-unauthorized-access-error</link>
<description>&lt;div&gt;
	&lt;pre class=&quot;brush:jscript;&quot;&gt;
&lt;/pre&gt;
	&lt;pre class=&quot;brush:jscript;&quot;&gt;
&lt;/pre&gt;
	&lt;pre class=&quot;brush:jscript;&quot;&gt;
	App42.initialize(constval.API, constval.KEY);
	var userCode = App42.getLoggedInUser();
	var userService = new App42User();
	userService.getUser(userCode, {
		success : function(object) {
			try {
				var userObj = JSON.parse(object);
				result = userObj.app42.response.users.user;
				$('#profiloEmail').text(result.email);
				$(&quot;#profilePageLoader&quot;).hide();
			} catch (error) {
				console.log(error.message);
			}
		},
		error : function(error) {
			$(&quot;#profilePageLoader&quot;).hide();
			showPageLoadingError(&quot;Utente NON trovato.&quot;, 5000);
		}
	});
&lt;/pre&gt;
	&lt;p&gt;
		&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&lt;span style=&quot;font-family: monospace; white-space: pre;&quot;&gt;Hello, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style=&quot;font-family: monospace; white-space: pre;&quot;&gt;When I execute this code for the first time I get an Un Authorized Access Error &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style=&quot;font-family: monospace; white-space: pre;&quot;&gt;If I do it for the second time it work correctly. I need to read the email associated to a user.&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=10250/userservice-1401-unauthorized-access-error</guid>
<pubDate>Mon, 27 Feb 2017 21:35:13 +0000</pubDate>
</item>
<item>
<title>how to give the fcm server key for javascript push notification in android setup?</title>
<link>http://forum.shephertz.com/?qa=10196/give-server-key-javascript-push-notification-android-setup</link>
<description>i have to put the fcm server key in android setup for our ionic android platform. using app42 javascript sdk. i have get the 401 error in push logs. but device is registered in the push notification users.</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=10196/give-server-key-javascript-push-notification-android-setup</guid>
<pubDate>Fri, 10 Feb 2017 12:32:03 +0000</pubDate>
</item>
<item>
<title>api.shephertz.com cannot be reached from AWS ec2</title>
<link>http://forum.shephertz.com/?qa=9857/api-shephertz-com-cannot-be-reached-from-aws-ec2</link>
<description>&lt;p&gt;
	&lt;span style=&quot;font-family: arial, sans-serif; font-size: 12.8px; orphans: 2; widows: 2;&quot;&gt;We have an emergency for our aws ec2 server. We cannot reach&amp;nbsp;&lt;/span&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://api.shephertz.com/&quot; style=&quot;font-family: arial, sans-serif; font-size: 12.8px; orphans: 2; widows: 2; color: rgb(17, 85, 204);&quot; target=&quot;_blank&quot;&gt;api.shephertz.com&lt;/a&gt;&lt;span style=&quot;font-family: arial, sans-serif; font-size: 12.8px; orphans: 2; widows: 2;&quot;&gt;&amp;nbsp;from our server. But I can reach it from my own computer.&lt;/span&gt;&lt;/p&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2;&quot;&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2;&quot;&gt;
	Here is the error log from Nodejs.&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2;&quot;&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2;&quot;&gt;
	&lt;div&gt;
		events.js:85&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; throw er; // Unhandled 'error' event&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^&lt;/div&gt;
	&lt;div&gt;
		Error: getaddrinfo ENOTFOUND&amp;nbsp;&lt;a rel=&quot;nofollow&quot; href=&quot;http://api.shephertz.com/&quot; style=&quot;color: rgb(17, 85, 204);&quot; target=&quot;_blank&quot;&gt;api.shephertz.com&lt;/a&gt;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp; &amp;nbsp; at errnoException (dns.js:44:10)&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp; &amp;nbsp; at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:94:26)&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2;&quot;&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2;&quot;&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2;&quot;&gt;
	When I run &amp;nbsp;&quot; host&amp;nbsp;&lt;a rel=&quot;nofollow&quot; href=&quot;http://api.shephertz.com/&quot; style=&quot;color: rgb(17, 85, 204);&quot; target=&quot;_blank&quot;&gt;api.shephertz.com&lt;/a&gt;&amp;nbsp;&quot; from terminal. I get:&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 12.8px; font-variant-ligatures: normal; orphans: 2; widows: 2;&quot;&gt;
	;; connection timed out; no servers could be reached&lt;br&gt;
	&lt;br&gt;
	&amp;nbsp;&lt;/div&gt;</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=9857/api-shephertz-com-cannot-be-reached-from-aws-ec2</guid>
<pubDate>Mon, 14 Nov 2016 17:34:19 +0000</pubDate>
</item>
<item>
<title>how to link the facebook signin in our ionic app using app42 social service?</title>
<link>http://forum.shephertz.com/?qa=9308/link-facebook-signin-our-ionic-app-using-app42-social-service</link>
<description>&lt;p&gt;
	controller.js CODE&lt;br&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
	$scope.FBLogin = function(){&lt;/div&gt;
&lt;div&gt;
	FB.login(function(response) {&lt;/div&gt;
&lt;div&gt;
	if (response.authResponse) {&lt;/div&gt;
&lt;div&gt;
	console.log('Welcome! &amp;nbsp;Fetching your information.... ');&lt;/div&gt;
&lt;div&gt;
	FB.api('/me', function(response) {&lt;/div&gt;
&lt;div&gt;
	console.log('Good to see you, ' + response.name + '.');&lt;/div&gt;
&lt;div&gt;
	console.log(response);&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;var fbresponse = FB.getAuthResponse();&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;console.log(fbresponse.userID);&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;var userName = fbresponse.userID, &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	accessToken = fbresponse.accessToken, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	social ; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	console.log(&quot;username..&quot;+userName);&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(&quot;at..&quot;+accessToken);&lt;/div&gt;
&lt;div&gt;
	var socialService &amp;nbsp;= new App42Social(); &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	socialService.linkUserFacebookAccount(userName, accessToken,{ &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	success: function(object) {&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log(&quot;object..&quot;+JSON.stringify(object));&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	var response = JSON.parse(object); &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	social = response.app42.response.social; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	console.log(&quot;userName is &quot; + social.userName) &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	console.log(&quot;fb Access Token is &quot; + social.facebookAccessToken) &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	$state.go('tabsController.home');&lt;/div&gt;
&lt;div&gt;
	}, &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	error: function(error) {&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&quot;error..;&quot;+error);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	} &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	});&lt;/div&gt;
&lt;div&gt;
	});&lt;/div&gt;
&lt;div&gt;
	} else {&lt;/div&gt;
&lt;div&gt;
	console.log('User cancelled login or did not fully authorize.');&lt;/div&gt;
&lt;div&gt;
	}&lt;/div&gt;
&lt;div&gt;
	});&lt;/div&gt;
&lt;div&gt;
	}&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	html CODE&lt;/div&gt;
&lt;div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp; &amp;nbsp; @@@ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;button id=&quot;login-facebook&quot; style=&quot;font-size:15px;border-radius:5px 5px 5px 5px;&quot; class=&quot;button button-positive button-block&quot; ng-click=&quot;FBLogin()&quot;&amp;gt;facebook login&amp;lt;/button&amp;gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&amp;nbsp;@@@@&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
	app.js CODE&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
	window.fbAsyncInit = function() {&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; FB.init({&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; appId &amp;nbsp; &amp;nbsp; &amp;nbsp;: '1663410043984668',&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; xfbml &amp;nbsp; &amp;nbsp; &amp;nbsp;: true,&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; version &amp;nbsp; &amp;nbsp;: 'v2.7'&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; };&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; (function(d, s, id){&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;var js, fjs = d.getElementsByTagName(s)[0];&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;if (d.getElementById(id)) {return;}&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;js = d.createElement(s); js.id = id;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;js.src = &quot;//connect.facebook.net/en_US/sdk.js&quot;;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;fjs.parentNode.insertBefore(js, fjs);&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp; &amp;nbsp;}(document, 'script', 'facebook-jssdk'));&lt;/div&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=9308/link-facebook-signin-our-ionic-app-using-app42-social-service</guid>
<pubDate>Thu, 21 Jul 2016 05:29:31 +0000</pubDate>
</item>
<item>
<title>Initialize in PHP and then switch to Javascript?</title>
<link>http://forum.shephertz.com/?qa=8828/initialize-in-php-and-then-switch-to-javascript</link>
<description>I don't like like revealing the secret key, despite the server side tools. I know the basics of PHP (codecademy course) but have not really used it, but it seems to me that I should be able to use PHP to initialize the APP42 connection, and then do the rest of the code in javascript, or at least use a little PHP so that the user does not get the secret key. Any help would be apprecaited. Thanks in advance</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=8828/initialize-in-php-and-then-switch-to-javascript</guid>
<pubDate>Thu, 12 May 2016 17:40:36 +0000</pubDate>
</item>
<item>
<title>Custom code support for Javascript</title>
<link>http://forum.shephertz.com/?qa=8751/custom-code-support-for-javascript</link>
<description>Hi,

 

We are developing the app in ionic/javascript and looking for custom code support. Do you have any plans to support ability to call custom code from ionic/js apps?

Are there any workarounds to achieve the same?

 

Thanks,

Raj</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=8751/custom-code-support-for-javascript</guid>
<pubDate>Wed, 04 May 2016 03:58:26 +0000</pubDate>
</item>
<item>
<title>Using the JavaScript SDK can not send push notifications</title>
<link>http://forum.shephertz.com/?qa=8413/using-the-javascript-sdk-can-not-send-push-notifications</link>
<description>&lt;p&gt;
	Hi,&lt;/p&gt;
&lt;p&gt;
	I try to send a push from the Web using JavaScript.&lt;/p&gt;
&lt;p&gt;
	Push to send using the &quot;sendPushMessageToAll&quot; function gives well-received.&lt;/p&gt;
&lt;p&gt;
	However, using a push &quot;send Push Message To User&quot; function does not arrive.&lt;/p&gt;
&lt;p&gt;
	What's the problem in the source below?&lt;/p&gt;
&lt;p&gt;
	Answers please.&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;pre class=&quot;brush:jscript;&quot;&gt;
  //username PUSH
  function Push_Username(){
   var apiKey = '3e3a8b7f8c0d........................................';
   var secretKey = '5e7b23f261d6.....................................';
   var userName = &quot;hj&quot;,
   message  = &quot;username PUSH By JS&quot;,
   result ; 
   App42.initialize(apiKey, secretKey);
   var pushNotificationService  = new App42Push();
   pushNotificationService.sendPushMessageToUser(userName, message, { 
    success: function(object)
    { 
     var pushNotification = JSON.parse(object); 
     result = pushNotification.app42.response.push;
     console.log(&quot;UserName is : &quot; + result.userName);
     console.log(&quot;Message is : &quot; + result.message) 
     console.log(&quot;Expiry is : &quot; + result.expiry) 
    }, 
    error: function(error) { 
    } 
   });
  }&lt;/pre&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=8413/using-the-javascript-sdk-can-not-send-push-notifications</guid>
<pubDate>Fri, 25 Mar 2016 01:00:44 +0000</pubDate>
</item>
<item>
<title>Java script error TypeError: p.success is not a function</title>
<link>http://forum.shephertz.com/?qa=8198/java-script-error-typeerror-p-success-is-not-a-function</link>
<description>I am new to App42, getting started with a mobile app using ionic.

As part of sign up screen, user registration is submitted to app42, persisted, after that it is throwing js error as below refering to app42 js library:

TypeError: p.success is not a function
createCORSRequest/c.onreadystatechange()
 App42-all-3.0.min.js:1748
 

Any thoughts?

 

Thanks,

Ravi Kumar P.</description>
<category>JavaScript</category>
<guid isPermaLink="true">http://forum.shephertz.com/?qa=8198/java-script-error-typeerror-p-success-is-not-a-function</guid>
<pubDate>Sun, 21 Feb 2016 03:40:41 +0000</pubDate>
</item>
</channel>
</rss>