Quantcast
Channel: DreamFactory Forum - Latest topics
Viewing all 1524 articles
Browse latest View live

Error when setup dreamfactory

$
0
0

@BryanCapah wrote:

i got this error when i enter command “php artisan df:setup
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table user add unique user_email_unique(email))”
i need help please

Posts: 1

Participants: 1

Read full topic


Windows Server Installation - Setup Fails

$
0
0

@pbeverage wrote:

Hello,

I have installed DreamFactory in a Linux instance (Ubuntu 18.04) just fine multiple times, hitting MSSQL as the backend, with no issue. However, any time that I try to install to Windows Server (any version), I end up at a place where I cannot install anything (using PHP 7.2, as required by the 3.0.0.4 DreamFactory compser files).
The current error I am stuck on is this:

However, I have already installed everything per the OCI8 installation instructions as far as I can tell. Has anyone else tried to install the latest version of DreamFactory for Windows? If so, have you had any success? As much as I would prefer to use Linux, I have specific need to be running on Windows so I can write a few custom providers against FoxPro and Access, as we will be stuck with some of those solutions for the foreseeable future, which is at least a year and a half to two years…

NOTE: If I do not install the updated files for Silver from the login-based download site, I get to the point where it starts creating the database object, but then fails regarding a problem with the migration in BaseModel.php. As with the above item, this is not an issue on Linux.

Posts: 1

Participants: 1

Read full topic

Fun With Boolean Columns -- MSSQL Laravel Error

$
0
0

@pbeverage wrote:

There is little to say that has not already been shared in previous issues for this, from 2015/16. Basically, any table I have that has a boolean column (BIT), data cannot be accessed.

The Response content must be a string or object implementing __toString(), “boolean” given.

There are no errors in my PHP log, nor in the DreamFactory logs in storage/logs/**. Unfortunately, I am not directly a PHP developer, so I cannot look into the issue very much myself. However, it seems that this kind of issue is indeed a bug, if it is still happening.

Any ideas how to fix this?


System Details

Windows Server 2016
PHP 7.2.24 (NTS)
MSSQL Server 2016 Developer

Posts: 1

Participants: 1

Read full topic

Cannot connect to remote mysql with error 500 "HY000"

$
0
0

@Mike_Dawson wrote:

See the error below, I have searched and cannot understand the issue. I am able to telnet into the database and have added the ip to the remote mysql table. Any help is appreciated.

{
“error”: {
“code”: “HY000”,
“message”: “SQLSTATE[HY000]: General error: 1298 Unknown or incorrect time zone: ‘’ (SQL: SELECT DATABASE() FROM DUAL)”
}
}

Posts: 1

Participants: 1

Read full topic

How to query postgresql JSONB?

$
0
0

@kelvin wrote:

Hi,

Does DreamFactory support postgresql JSONB?
If it supports, it would be helpful if you can give an example, how to query jsonb with filter.

BR,
Kelvin

Posts: 1

Participants: 1

Read full topic

Salesforce Integration with Hosted DreamFactory 3.0.1

$
0
0

@MoninShiraz wrote:

I am trying to connect DreamFactory with Salesforce, however I can’t use Salesforce SOAP API since it requires me to have a on-prem DreamFactory solution but we have Hosted solution or at lease this is what I have been told by DF support I am working with.

I am very new to DreamFactory and I am not having any good luck from DF support that’s why I am posting my question here, hoping someone with DF experience/expert can assist me. I know Salesforce also offers REST API which I should be able to integrate using DF Remove Web Service, however, I can not figure out how. Ideally, I should be able to configure DF with Salesforce and from DF side I should only need to generate a single Token and should be able to start consuming Salesforce endpoints but right now DF support and I can’t find a way to do that.

What is happening I can get a token for Salesforce and DreamFactory from DreamFactory side but as soon as I try to pass both tokens it is errors out stating it is invalid. It is very possible we are not doing this right. In the header I am passing X-DreamFactory-API-Key, X-DreamFactory-Session-Token, and Authorization (which is a token from Salesforce in the format BEARER TOKEN)

It is very possible I am doing this completely wrong that’s why I need an export in Dreamfactory to guide me. Has anyone ever configure Salesforce with Hosted DreamFactory solution and what are steps I need to take?

Posts: 1

Participants: 1

Read full topic

Error: no such file or directory

$
0
0

@fwu wrote:

hello,

Sometimes Im getting the following error. Can someone tell me why?

No such file or directory:
dreamfactory-2.14.1-4\apps\dreamfactory\htdocs\storage\framework/cache/data/a2/big_name_here

It seems that a cached file was deleted. If it is a cached file, at least a new one should be created to avoid this error, right?

thank you!

Posts: 1

Participants: 1

Read full topic

Configuring DB Service Using system API

$
0
0

@tabraham wrote:

I am trying to access & configure the ‘database’ parameter of a postgresql service using GET/PATCH and unable to do either.

https://<server>/api/v2/system/service/<id>?fields=*&api_key=<KEY>
works and results in a full list of fields and values like below

{“id”:20,“name”:“servicename”,“label”:“PostgresDB”,“description”:“Postgres Database”,“is_active”:true,“type”:“pgsql”,“mutable”:true,
…,
…,
“config”:{“service_id”:20,“options”:null,“attributes”:null,“statements”:null,“host”:“xxx.xxx.xx.xx”,“port”:5432,“database”:“psqldb”,“username”:“user”,“password”:"**********",“schema”:“public”,“charset”:null,“sslmode”:“allow”,“timezone”:null,“application_name”:“appname”,“max_records”:10000,“allow_upsert”:false,“cache_enabled”:false,“cache_ttl”:0}}

https://<server>/api/v2/system/service/<id>?fields=id,name&api_key=<KEY>
also works

However, retrieving ONLY the config or the ‘database’ value within the config is not working.

Any inputs on retrieving and also modifying the ‘database’ value much appreciated.
Thanks much!

Posts: 1

Participants: 1

Read full topic


Problem with login to admin console and events

$
0
0

@LuchoRod wrote:

Greetings,

I’ve modified the event user.session.pre.post to block empty apikeys and others but my own created apps. The problem is that now i cant even login to DF’s admin console. Is there a way to avoid the pre event or access to the BD and delete it?

Another question: is there a way to block the empty apikeys or those not registered in my DF instance?

Thanks in advance,

Lucho

Posts: 1

Participants: 1

Read full topic

One service with multiple databases

$
0
0

@Kryger wrote:

Hi all

Is it possible to have one service, which can connect to multiple SQL databases?

We have a SQL server with multiple databases, all with the same schemas, but right now we have to create a new service for each database and therefore also change or add roles. Since all users have the same rights across all databases it would be must easier for us with just one service.

Hope you can help :slight_smile:

  • Christian

Posts: 1

Participants: 1

Read full topic

How to connect MS SQL

$
0
0

@hibrid wrote:

Hi everyone, I’m really new with DreamFactory. But I want to make an small API.

  1. I have db on MS SQL,
  2. I put the DB on Azure.
  3. Connect to DreamFactory.
  4. Create a role.
  5. Test API Doc, and work fine I get access to tables, records etc.
  6. Download JSON files from SERVICE DOC.
  7. Import JSON file on Swagger Editor local. Showing errors. (Swagger local show a lot of error, Swagger Cloud show 6 errros).
  8. Generate Server Side Scripts for Node.JS.
  9. Uncompress scripts generated and install Connect Framework.
  10. Combine both directories.
  11. NPM Install.
  12. Node index.js

Where I put the db settings?
How can I fix theses 130 errors?

This is the console log:
D:\dev\api>node index.js

API Errors:

#/paths/~1_func~1{function_name}/post/parameters/1: Not a valid parameter definition
#/paths/~1_func~1{function_name}/post/parameters/1: Not a valid parameter definition
#: Missing required property: schema
#: Missing required property: type
#/paths/~1_func~1{function_name}/post/parameters/1: Missing required property: $ref
#/paths/~1_func~1{function_name}/post/parameters/0: Not a valid parameter definition
#/paths/~1_func~1{function_name}/post/parameters/0: Not a valid parameter definition
#: Missing required property: schema
#: Missing required property: type
Cut the log here.

138 errors and 0 warnings

Posts: 1

Participants: 1

Read full topic

Schema Unsupported service type 'mysql'

$
0
0

@andres81 wrote:

Hi there guys,

I installed a new VM in Azure with Bitnami image with DreamFactory on it. It came with the latest DreamFactory Version: 3.0.1. When I try to go to schema and select ‘MySQL Database’ I get error message:

" Schema Unsupported service type ‘mysql’. "

The same happens with if I select MongoDB (only error msg says mongodb).
Did I messed up something in my configuration or why is this happening?

Any clues or pointers are appreciate it.
Thank you,

Andres

Posts: 1

Participants: 1

Read full topic

Implementing Passwordless Login with DF

$
0
0

@garyhow wrote:

how possible is it to use dreamfactory and implement a login page for my web app that uses dreamfactory.

  1. DF syncs users from Active Directory
  2. User input email address into login form
  3. Web app passes the email address to DF, checks it is a valid user, creates a ‘session’ that last for 1 hour, then generate a 1 time login URL (maybe with JWT embed in the url string), finally send this generated URL to the user email
  4. User clicks on link in the email and is logon to the web app.

Possible? How?

Posts: 1

Participants: 1

Read full topic

Pre-Process Scripts Not Working As Expected (NodeJS, DF 3.0.1)

$
0
0

@pbeverage wrote:

So, I will cut this very short, because my patience and my tolerance for things not working correctly is basically gone at this point. According to the documentation, I can modify data before it hits an API / Database, such as scrubbing SSN numbers, by using a Pre-Process server-side script. However, no matter what I do in a Pre-Process script, the call never does what it should; it always complains about a field missing, or data missing, even though they are obviously there from the script (a small sample below).

if (event.request.payload.resource) { 

    // Go through each record and modify appropriately
    if (event.request.payload.resource.length  && event.request.payload.resource.length >= 1) {
        event.request.payload.resource.forEach((record, idx) => {
        
            // Placeholder for the actual request detail
            let request = {};
            
            // Pull data from the API request and format appropriately
            request.JO = record.so.jobOrder;
            request.PanelNo = record.ps.panelNo;

            // This reassignment works, as I see it correct in the below console.log statements
            event.request.payload.resource[idx] = request;
            console.log(record);
            console.log(event.request.payload);
        });
    }
}

According to console.log, here is what I now have:

{
  resource: [
    {
      JO: '2',
      PanelNo: '4',
      DR: '5',
      FK_WorkStatusId: 200
    }
  ]
}

However, according to the error I get back from the DreamFactory API when trying to post, this is not what the data looks like at all:

{
    "error": {
        "code": 1000,
        "context": {
            "error": [
                0
            ],
            "resource": [
                {
                    "code": 400,
                    "context": null,
                    "message": "Required field 'fk_workstatusid' can not be NULL.",
                    "status_code": 400
                }
            ]
        },
        "message": "Batch Error: Not all requested records could be created.",
        "status_code": 500
    }
}

NOTE: The lowercase/uppercase naming of the field is meaningless, as adding a second field with the lowercase name still results in this error message. From what I gather, the technique shown in the documentation seems to have problems with accurately working.

NOTE: Here is the sample from DF [http://wiki.dreamfactory.com/DreamFactory/Tutorials/V8_field_scrambling]

NOTE: The script is Active

NOTE: The script is allowed to modify the request payload

NOTE: If I take the data from the console.log statement, and put it into Insomnia or another tool, I can post to the database using the same API without issue, which IMO indicates an issue with this feature to modify an incoming request during POST

Any ideas?

Posts: 1

Participants: 1

Read full topic

Nodejs service returns undefined

$
0
0

@LuchoRod wrote:

Guys, i’ve created a node.js service in DF using 2 packages (speakeasy and qrcode). In that service i’m trying to define some functions according to Node custom scripting service math tutorial but when the script tries to create the qrcode, i asume it takes quite time to respond because the service finish before return something. Maybe is more a node.js error than a dreamfactory error, but the code i’m using i took from a node.js script (wich uses express to expose the apis).

This is my code:

var resource, result;
 
const speakeasy = require('speakeasy');
const QRCode = require('qrcode');
 
var methods = ['GET', 'POST', 'DELETE'];
if (!methods.includes(event.request.method)) {
    throw new Error("Only HTTP GET, POST and DELETE are allowed on this service.");
}

// get resource, /tfa —> "", /tfa/setup —> "setup"
resource = event.resource;
switch (resource) {
    case "":
        // /tfa means return all supported resources
        result = {"resource": ["setup", "verify"]};
        break;
    case "setup":
        if(event.request.method == 'POST'){
            console.log('DEBUG: Received TFA setup request');
            const secret = speakeasy.generateSecret({
                length: 10,
                name: 'user',
                issuer: 'Portal v1.0'
            });
            console.log('secret: ' + JSON.stringify(secret));

            var url = speakeasy.otpauthURL({
                secret: secret.base32,
                label: 'user',
                issuer: 'Portal v1.0',
                encoding: 'base32'
            });

            QRCode.toDataURL(url, (err, dataURL) => {
                console.log('dataURL: ' + dataURL);

                result = {
                    message: 'TFA Auth needs to be verified',
                    tempSecret: secret.base32,
                    dataURL,
                    tfaURL: secret.otpauth_url
                };    
            });
        }
        if(event.request.method == 'GET'){
            result = {
                message: 'GET setup TFA',
                tempSecret: 'secret'
            };
        }
        break;
    case "verify":
        result = {"result": "verify"};
        break;
    default:
        throw new Error("Invalid or missing resource name.");
        break;
}
console.log('return result: ' +  JSON.stringify(result));
return result;

When i check the log, it shows this:

What i want to know what to know to return the complete result object, including the dataURL. Thanks in advance.

Lucho.

Posts: 1

Participants: 1

Read full topic


Rollback Not Working As Expected (3.0.1)

$
0
0

@pbeverage wrote:

So, back for more fun! I am trying something relatively simple; inserting data into multiple database tables, via FK relationships. Per the documentation, the Rollback option being specified in the URL

?rollback=true

should make it so that any failure to insert data in one or more related tables would ensure that everything rolled back. Yet, putting bad data that cannot insert into any of the related tables still results in the Parent table and potentially other Child tables being written to, regardless of the Transaction purportedly being rolled back.

Does anyone have a solution to get an ACTUAL rollback to occur, outside of resorting to using only Stored Procedures for everything? I am really beginning to have some major regrets at using this platform :angry:

NOTE: This “works” the same both with a translation pre-process script and with avoiding the pre-process script (ie, directly specifying the data for each table/relationship) – so the pre-process script is not the issue.

Posts: 1

Participants: 1

Read full topic

Mac Error Code issue in Apple

$
0
0

@katedun wrote:

The output of a cryptographic hash function, also known as a message digest, can provide strong assurances about data integrity, whether changes of the data are accidental (e.g., due to transmission errors) or maliciously introduced. When we face Mac Error Code 43, this function becomes redundant and exposure to malware is enormous.

Posts: 1

Participants: 1

Read full topic

DF Sendgrid Webhook Issues

$
0
0

@toddpppp wrote:

Sorry for the lack of info, but was wondering if anyone could help me troubleshoot an issue with the sendgrid event webbook.

DF 3.0 (OSS)
DF database SQLITE
API Service DB Postgres (same server as DF)
API permissions/role: FULL permissions as currently in DEV (i.e. PUT, POST, GET etc etc)
Service setup: pretty much default, host: 127.0.0.1, schema: public, allow upsert, enable cache etc

Error:

==> …/nginx/error.log <==

2020/02/02 02:41:05 [error] 1471#1471: *4957 FastCGI sent in stderr: “PHP message: REST Exception #1000 > Batch Error: Not all requested records could be created” while reading response header from upstream, client: x.x.x.x.x, server: xxx.xxx.com.au, request: “POST /api/v2/sendgrid/_table/activity_webhook?api_key=xxxxxxxxxxx HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php/php7.2-fpm.sock:”, host: “xxx.xxxx.com.au”

I also get this in nginx log when it fails.

x.x.x.x - - [02/Feb/2020:02:43:59 +0000] “POST /api/v2/sendgrid/_table/activity_webhook?api_key=xxxxxx HTTP/1.1” 500 20642 “-” “SendGrid Event API”

Any help would be appreciated.

Posts: 1

Participants: 1

Read full topic

Can't find any current Release Notes

$
0
0

@goblin wrote:

The latest release notes in the Wiki are from 2.14, and we are now on 4.0 and I can’t find any release notes for any of the releases between those version. The Github release tags also contains very little information. Where can I find detailed release notes?

Posts: 1

Participants: 1

Read full topic

Unable to login on DF 2.14

$
0
0

@luca wrote:

Hi after many months I’m no more able to login to my dreamfactory UI page.
When I insert my username and my password and click “Login” button nothing appear, no error and notification are displayed.
In Dreamfactory.log there is no evidence of any password or login issue…please could you help me to understand how to debug this problem ?

Posts: 1

Participants: 1

Read full topic

Viewing all 1524 articles
Browse latest View live