FatFractal customer forums



Recent Posts

Pages: [1] 2 3 ... 10
1
NoServer Questions and Answers / EngineSecurityManager Error
« Last post by julio.bradford on March 04, 2016, 07:17:53 PM »
Getting the following error when call httpclient.request(); server side is nodejs and express with no require authetication.  I get about 10 error before the call succeed.

Regards

INFO | com.fatfractal.noserver.serverside.FF_JS_API$ScriptLogger | 2016.03.04 10 at 04:34:05.893 PM MST | ScheduledTask_ProcessAutoDataLoad | system | ymubO_-3GP-Af-evWSqTs6 | *** PMIRestfulWebService.getRequest.Request is [{"url":"http://pmi-coreos-bm04.dropsupplies.com:3000/companies","method":"GET","headers":{"Accept":"application/json","Content-Type":"application/json"}}]
ERROR | com.fatfractal.engine.security.EngineSecurityManager | 2016.03.04 10 at 04:34:06.222 PM MST | Security manager: Access denied for : checkPermission ([java.net.URLPermission http://pmi-coreos-bm04.dropsupplies.com:3000/companies GET:AcceptAccept-EncodingUser-Agent])
ERROR | STACK_TRACE | 2016.03.04 10 at 04:34:06.338 PM MST | java.lang.Exception
   at com.fatfractal.engine.security.EngineSecurityManager.checkPermission(EngineSecurityManager.java:295)
   at sun.net.www.protocol.http.HttpURLConnection.URLtoSocketPermission(HttpURLConnection.java:1034)
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1425)
   at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)

code
      var url     = "http://pmi-coreos-bm04.dropsupplies.com:3000/companies";
      var headers = {"Accept" : "application/json", "Content-Type" : "application/json" }
      var request = {
         url: url,
         method: "GET",
         headers: headers
      };

      try {
         ff.logger.forceInfo ("*** PMIRestfulWebService.getRequest.Request is [" + JSON.stringify(request) + "]");
   var httpResponse = hc.request(request);
   var ccStatusCode = httpResponse.status;
   var ccResponse   = JSON.parse(httpResponse.content);

Nodejs code

var http = require('http'),
    express = require('express'),
    compression = require('compression'),
    morgan = require('morgan'),
    favicon = require('serve-favicon'),
    company = require('./routes/companies');

var app    = express();
app.use(compression());
var web400 = require('./server-web400');
var pm400  = require('./server-pm400');
var qs400  = require('./server-qs400');

app.get('/companies', company.findAll);
app.get('/companies/:id', company.findById);

app.listen(3000);
console.log('Listening on port 3000...');

node code example
2
NoServer Questions and Answers / Server-side code authentication
« Last post by metakite on January 19, 2016, 04:07:22 PM »
I'd like to authenticate an external website against the credentials I have stored in my FFUser table. To do that, I need to create an extension that receives a username and password and returns whether the username/password pair is valid. Are there any methods available in the Javascript server-side API that will allow me to determine if a provided password is valid for a given username without actually using those credentials to login? I looked around the docs, but couldn't find anything. I'm hoping I overlooked it.
3
I am converting my project from Objective-C to Swift and have run into a bit of a stumbling block with the objectFromDictionary method in that any attribute that is typed with an enum is not recognized by the method in the swift project, whereas the same approach works just fine in the objective-c version.  All other attributes of NSDate, String, Int, etc. are fine.

Does anyone know of a workaround/fix for this in swift?
4
NoServer Questions and Answers / Re: Loading BLOBs anonymously
« Last post by kwylez on October 07, 2015, 07:20:13 AM »
Thanks Gary...
5
NoServer Questions and Answers / Re: Loading BLOBs anonymously
« Last post by gkc on October 05, 2015, 06:22:13 PM »
Hi there,

Looks like a regression from a recent release. Will aim to fix tomorrow. It's not a permissions thing; just a bug in the data browser.

Apologies for the inconvenience
6
NoServer Questions and Answers / Loading BLOBs anonymously
« Last post by kwylez on October 04, 2015, 01:02:34 PM »
I uploaded a photo through the data browser (logged in), but I can't view it in the data browser if I'm logged out. The object itself is viewable whether or not I'm logged in.  I've tried setting
Code: [Select]
SET_PRIVATE AllowAnonymousGets true and
Code: [Select]
PERMIT read:public write:public ON /Photos and still no luck. Is there a default OAP for BLOBs?
7
NoServer Questions and Answers / Re: Connecting Locally through XCode
« Last post by gkc on October 04, 2015, 09:36:28 AM »
Hi there,

When testing against localhost, you will need to include this in the app's Info.plist

<key>NSAppTransportSecurity</key>
<dict>
   <key>NSAllowsArbitraryLoads</key>
   <true/>
</dict>

NB: This should not be in the Info.plist when submitting to App Store
8
NoServer Questions and Answers / Connecting Locally through XCode
« Last post by Rich on September 24, 2015, 09:14:38 PM »
We have been able to setup a local install of FatFractal and connect through the databrowser, we also have our iOS app connecting and running with our backend in the cloud.

However, we were wondering if there is anything special that needs to be done to connect to the local fatfractal install through XCode to run the iOS app.

We have our connection strings as:

static NSString *baseUrl = @"http://localhost:8080/<appName>";
static NSString *sslUrl = @"https://localhost:8443/<appName>";

We've tried adding:

[FFHttpDelegate addTrustedHost:@"localhost:8443/<appName>"];
[FFHttpDelegate addTrustedHost:@"localhost:8080/<appName>"];

And we get SSL errors when trying to login:

2015-09-24 19:57:59.644 Wryvals[9701:890404] Started (from main thread <NSThread: 0x7fc21d2012c0>{number = 1, name = main}) NSURLConnection for POST to https://localhost:8443/wyvalsAlpha/ff/login
2015-09-24 19:57:59.735 Wryvals[9701:890404] canAuthenticateAgainstProtectionSpace <NSURLProtectionSpace: 0x7fc21ae06f20>: Host:localhost, Server:https, Auth-Scheme:NSURLAuthenticationMethodServerTrust, Realm:(null), Port:8443, Proxy:NO, Proxy-Type:(null) called
2015-09-24 19:57:59.735 Wryvals[9701:890404] didReceiveAuthenticationChallenge <NSURLAuthenticationChallenge: 0x7fc21ae06f20> called
2015-09-24 19:57:59.735 Wryvals[9701:890404]          Challenge.protectionSpace.host == localhost
2015-09-24 19:57:59.735 Wryvals[9701:890404]          Host is a trusted host
2015-09-24 19:57:59.738 Wryvals[9701:890500] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
2015-09-24 19:57:59.740 Wryvals[9701:890404] FFHttpDelegate calling onComplete for POST to https://localhost:8443/wyvalsAlpha/ff/login from main thread <NSThread: 0x7fc21d2012c0>{number = 1, name = main}
2015-09-24 19:57:59.741 Wryvals[9701:890404] HTTP POST failed: An SSL error has occurred and a secure connection to the server cannot be made. : statusCode 0
2015-09-24 19:57:59.742 Wryvals[9701:890404] Login failed: An SSL error has occurred and a secure connection to the server cannot be made.
2015-09-24 19:57:59.743 Wryvals[9701:890404] LoginWithUserName:(Passjjs) andPassword(Richard2) failed with error:(Error Domain=FatFractal Code=0 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made.}).
2015-09-24 19:57:59.812 Wryvals[9701:890404] Login failed

Is there any way to disable the need to login through SSL?
9
NoServer Questions and Answers / Re: Registering New User: Error 1
« Last post by metakite on September 11, 2015, 04:43:21 PM »
Gary helped me offline and found my problem.

For the benefit of anyone who comes after me, this error was a result of initializing the FatFractal object with the wrong base URL. A simple typo.

Thanks Gary!
10
NoServer Questions and Answers / Registering New User: Error 1
« Last post by metakite on September 11, 2015, 03:04:32 PM »
I'm trying to spin up a new app, and I think I might have something configured incorrectly in my FatFractal NoServer installation.

I'm trying to use the iOS SDK to register a new user with this FatFractal method:

Code: [Select]
- (void) registerUser:(id<FFUserProtocol>)user password:(NSString *)password onComplete:(FFHttpMethodCompletion)onComplete;
When I do, I get back an error:
Code: [Select]
Error Domain=FatFractal
Error Code=1
Localized Description="HTTP POST returned no data, but no error was set ..."

I can't really tell what's wrong from reading the reported error message, so I am hoping that you can clue me in.

For your reference, here is my app info:
subdomain: metakite
app: metatax

And below are the contents of my Xcode console log when I enable debug logging in the FatFractal SDK:
Code: [Select]
2015-09-11 14:52:03.304 MetaTax[60801:9521265] Reachability Flag Status: -R -----l- networkStatusForFlags
2015-09-11 14:52:03.307 MetaTax[60801:9521265] Application URL: https://metakite.fatfractal.com/metakite
2015-09-11 14:52:03.308 MetaTax[60801:9521631] Loading queued operations from local storage
2015-09-11 14:52:03.308 MetaTax[60801:9521631] No local queued operation store found!
2015-09-11 14:52:38.819 MetaTax[60801:9521265] Reachability Flag Status: -R -----l- networkStatusForFlags
2015-09-11 14:52:38.819 MetaTax[60801:9521265] Attempting to register new user FFUser[ guid[(null)] active[0], userName[test],firstName[(null)],lastName[(null)],email[charles@metakite.com], authDomain[(null)], scriptAuthService[(null)], groupsLoaded[0],groups[{
}]] to https://metakite.fatfractal.com/metakite/ff/register
2015-09-11 14:52:38.820 MetaTax[60801:9521265] getClazzFromClass:FFUser returning FFUser
2015-09-11 14:52:38.820 MetaTax[60801:9521265] classToClazzDict is {
}
2015-09-11 14:52:38.820 MetaTax[60801:9521265] dictionaryFromObject: Got property attributes T@"NSString",&,N,VlastName for key lastName
2015-09-11 14:52:38.821 MetaTax[60801:9521265] dictionaryFromObject: Setting [NSNull null] for lastName
2015-09-11 14:52:38.821 MetaTax[60801:9521265] dictionaryFromObject: Got property attributes T@"NSString",&,N,Vguid for key guid
2015-09-11 14:52:38.821 MetaTax[60801:9521265] dictionaryFromObject: Setting [NSNull null] for guid
2015-09-11 14:52:38.821 MetaTax[60801:9521265] dictionaryFromObject: Got property attributes T@"NSString",&,N,VfirstName for key firstName
2015-09-11 14:52:38.830 MetaTax[60801:9521265] dictionaryFromObject: Setting [NSNull null] for firstName
2015-09-11 14:52:38.830 MetaTax[60801:9521265] dictionaryFromObject: Got property attributes Tc,N,Vactive for key active
2015-09-11 14:52:38.831 MetaTax[60801:9521265] dictionaryFromObject: Got property attributes T@"NSString",&,N,VauthDomain for key authDomain
2015-09-11 14:52:38.831 MetaTax[60801:9521265] dictionaryFromObject: Setting [NSNull null] for authDomain
2015-09-11 14:52:38.831 MetaTax[60801:9521265] dictionaryFromObject: Got property attributes T@"NSString",&,N,VuserName for key userName
2015-09-11 14:52:38.831 MetaTax[60801:9521265] dictionaryFromObject: Got property attributes T@"NSString",&,N,Vemail for key email
2015-09-11 14:52:38.831 MetaTax[60801:9521265] dictionaryFromObject: Got property attributes T@"NSString",&,N,VscriptAuthService for key scriptAuthService
2015-09-11 14:52:38.831 MetaTax[60801:9521265] dictionaryFromObject: Setting [NSNull null] for scriptAuthService
2015-09-11 14:52:38.839 MetaTax[60801:9521265] metaDataForObj: Did not find in-memory metadata for object FFUser[ guid[(null)] active[0], userName[test],firstName[(null)],lastName[(null)],email[charles@metakite.com], authDomain[(null)], scriptAuthService[(null)], groupsLoaded[0],groups[{
}]]
2015-09-11 14:52:38.839 MetaTax[60801:9521265] dictionaryFromObject created dictionary {
    active = 0;
    authDomain = "<null>";
    clazz = FFUser;
    email = "charles@metakite.com";
    firstName = "<null>";
    guid = "<null>";
    lastName = "<null>";
    scriptAuthService = "<null>";
    userName = test;
} from object FFUser[ guid[(null)] active[0], userName[test],firstName[(null)],lastName[(null)],email[charles@metakite.com], authDomain[(null)], scriptAuthService[(null)], groupsLoaded[0],groups[{
}]]
2015-09-11 14:52:38.839 MetaTax[60801:9521265] invokeHttpMethod: Will send HTTP POST to url: https://metakite.fatfractal.com/metakite/ff/register in thread <NSThread: 0x78894440>{number = 1, name = main}
2015-09-11 14:52:38.861 MetaTax[60801:9521265] invokeHttpMethod:

HTTP request body (pretty-print):

{
  "clazz" : "FFUser",
  "lastName" : null,
  "guid" : null,
  "firstName" : null,
  "password" : "thePassword",
  "active" : false,
  "authDomain" : "LOCAL",
  "userName" : "test",
  "email" : "charles@metakite.com",
  "scriptAuthService" : null
}

2015-09-11 14:52:38.864 MetaTax[60801:9521265] Started (from main thread <NSThread: 0x78894440>{number = 1, name = main}) NSURLConnection for POST to https://metakite.fatfractal.com/metakite/ff/register
2015-09-11 14:52:38.996 MetaTax[60801:9521265] canAuthenticateAgainstProtectionSpace <NSURLProtectionSpace: 0x78b39ce0>: Host:metakite.fatfractal.com, Server:https, Auth-Scheme:NSURLAuthenticationMethodServerTrust, Realm:(null), Port:443, Proxy:NO, Proxy-Type:(null) called
2015-09-11 14:52:39.128 MetaTax[60801:9521265] FFHttpDelegate calling onComplete for POST to https://metakite.fatfractal.com/metakite/ff/register from main thread <NSThread: 0x78894440>{number = 1, name = main}
Pages: [1] 2 3 ... 10
Copyright © FatFractal customer forums