Start a new topic
Answered

Kinvey Flex SDK

Need information on how to make use of Kinvey Flex SDK to remove the server less architecture. Any help is appreciated. 


Best Answer
Suraj,

No. We don't need to give any special access in the console in order to config the Kinvey-cli locally.

I reviewed the logs and found that you have 2 separate apps on 'fi-us1' and 'fi-us2'. Please make sure you are using the correct host where Flex service is created. Have you tried the following?


If the above suggestion doesn't work, then I will get inputs from engineering on this issue.

Thanks,
Pranav
Kinvey

Suraj,

  1. Are you able to test this locally without any issues? Please check this link about local testing http://devcenter.kinvey.com/ios/guides/flexservice-runtime#TestingFlexServices
  2. Have you confirmed that you have added all the dependencies to package.json?
  3. Did you try 'Logging' to check if more information is present on the error that you are getting? Check this link for 'Logging' details - http://devcenter.kinvey.com/ios/guides/flexservice-runtime#Logging

Thanks,
Pranav
Kinvey

Hello Surya,


Thank you very much for moving your question to the Forum.


Can you describe your use case in greater detail, please. We don't understand what you're trying to accomplish. The Kinvey Flex SDK is a serverless architecture and you're asking to remove it. Can you help us understand what you are trying to accomplish?


Regards,


Billy Gee



Suraj,

Are you able to configure Kinvey cli before deploying?
http://devcenter.kinvey.com/ios/guides/flexservice-runtime#ConfiguringtheKinveyCLI

Use following command :
kinvey config --host https://manage.kinvey.com

 


You will be prompted for your Kinvey credentials if you haven't logged in yet. These are the same credentials used when logging in to the Kinvey Console. Once you are done with configuring, try "kinvey deploy" and let me know how it goes.


Thanks,

Pranav

Kinvey

Hi Pranav,


I am afraid, I am not able to login using y credentials through the command kinvey config --host https://manage.kinvey.com. It shows "warning: Invalid credentials, please authenticate". They are the credentials with which I generally login to Kinvey console.


Is there any other way that includes creating separate credentials for Kinvey CLI.


One more thing, we can access kinvey CLIs command prompt through the normal Node JS command prompt right? 


Thanks

Suraj

Apologies. Actually, I wanted to remove the server which I am using for my purpose. Nonetheless, I wanted to understand a concept of this Kinvey Flex SDK. The use case goes below,


 I am into Node JS and I have to code something in such a way that I should use "kinvey flex sdk" to make GET or POST request. A simple example would be fine. 


Example: I have a setup to enter username/password. Need to make use of "kinvey flex sdk" to POST it using request.post() method. Kinvey's part would be to authenticate the user and send a token back or a mere string "Authenticated". 


App Key - kid_S1Va9pr1b


Please help.


Regards

Suraj

Suraj,

As a paying customer, you have access to Kinvey Support ticketing system (freshdesk). I was discussing this issue with my senior and found that you also have a dedicated slack channel. Can you please post your query on slack channel? This is Kinvey Forums - a public platform for free plan developers exploring Kinvey. Also the error which you are seeing is a Windows specific error. I also use mac and haven't seen such issue yet. It would be better if you post your question on dedicated channel or Kinvey support ticketing system. Once you post your question on dedicated channel, our team will continue to help you there.

 

Thanks,

Pranav

Kinvey

Hi,


Also when I created a collection in Kinvey and tried to create a Flex service through service catalog. I am getting the attached error also. Please help me with this. 

FlexError.PNG
(11.9 KB)

Hi there,


Could anyone tell me how to create a service object for a Flex service in service catalog of Kinvey, while creating service type for the Collections in Kinvey?


Thanks

Hi Pranav,


Now, I was able to login using the credentials to https://manage.kinvey.com. It asked whether I wanted to access the below,

1. apps

2. organization.


When I selected "apps", I was displayed a set of applications which I have created in https://console.kinvey.com/.

I have my Flex service in a different host URL provided by kinvey. Is there a command to access the application in that host. 


The other host URl would be from my project, something like "https://*****.console.kinvey.com/".


Regards

Suraj

Suraj,

What version of kinvey-cli you are using? Please update it if you are not using the latest one.

As you are using a dedicated instance,  the 'config' command takes an optional [instance] parameter in order to deploy FlexServices to dedicated instances of Kinvey. Check https://github.com/Kinvey/kinvey-cli#proxy-settings.

Also, for more information, run "kinvey -h".

 

Thanks,

Pranav

Kinvey

Pranav,


Do we need to give some special access in the kinvey console account in order to config the Kinve CLI locally? 

Answer
Suraj,

No. We don't need to give any special access in the console in order to config the Kinvey-cli locally.

I reviewed the logs and found that you have 2 separate apps on 'fi-us1' and 'fi-us2'. Please make sure you are using the correct host where Flex service is created. Have you tried the following?


If the above suggestion doesn't work, then I will get inputs from engineering on this issue.

Thanks,
Pranav
Kinvey

Hi Pranav,


Apologies to keep asking after every hurdles. I am getting something like below while deploying my Flex code,


        throw er

        ^

 

Error: EPERM: operation not permitted, scandir 'C:\Users\447299\AppData\Local\Ap

plication Data'

  at Object.fs.readdirSync (fs.js:871:18)

  at GlobSync._readdir (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-

cli\node_modules\glob\sync.js:288:41)

  at GlobSync._readdirInGlobStar (C:\Users\447299\AppData\Roaming\npm\node_modul

es\kinvey-cli\node_modules\glob\sync.js:267:20)

  at GlobSync._readdir (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-

cli\node_modules\glob\sync.js:276:17)

  at GlobSync._processReaddir (C:\Users\447299\AppData\Roaming\npm\node_modules\

kinvey-cli\node_modules\glob\sync.js:137:22)

  at GlobSync._process (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-

cli\node_modules\glob\sync.js:132:10)

  at GlobSync._processGlobStar (C:\Users\447299\AppData\Roaming\npm\node_modules

\kinvey-cli\node_modules\glob\sync.js:380:10)

  at GlobSync._process (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-

cli\node_modules\glob\sync.js:130:10)

  at GlobSync._processGlobStar (C:\Users\447299\AppData\Roaming\npm\node_modules

\kinvey-cli\node_modules\glob\sync.js:383:10)

  at GlobSync._process (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-

cli\node_modules\glob\sync.js:130:10)

  at GlobSync._processGlobStar (C:\Users\447299\AppData\Roaming\npm\node_modules

\kinvey-cli\node_modules\glob\sync.js:383:10)

  at GlobSync._process (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-

cli\node_modules\glob\sync.js:130:10)

  at new GlobSync (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\n

ode_modules\glob\sync.js:48:10)

  at Function.globSync [as sync] (C:\Users\447299\AppData\Roaming\npm\node_modul

es\kinvey-cli\node_modules\glob\sync.js:26:10)

  at C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\node_modules\ar

chiver-utils\file.js:62:17

  at C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\node_modules\ar

chiver-utils\file.js:30:19

  at Array.forEach (native)

  at processPatterns (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cl

i\node_modules\archiver-utils\file.js:24:23)

  at Object.file.expand (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey

-cli\node_modules\archiver-utils\file.js:60:17)

  at Object.file.expandMapping (C:\Users\447299\AppData\Roaming\npm\node_modules

\kinvey-cli\node_modules\archiver-utils\file.js:94:8)

  at C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\node_modules\ar

chiver-utils\file.js:159:19

  at arrayMap (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\node_

modules\lodash\lodash.js:660:23)

  at Function.map (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\n

ode_modules\lodash\lodash.js:9571:14)

  at interceptor (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\no

de_modules\lodash\lodash.js:16970:35)

  at thru (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\node_modu

les\lodash\lodash.js:8812:14)

  at C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\node_modules\lo

dash\lodash.js:4379:28

  at arrayReduce (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\no

de_modules\lodash\lodash.js:704:21)

  at baseWrapperValue (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-c

li\node_modules\lodash\lodash.js:4378:14)

  at LazyWrapper.lazyValue [as value] (C:\Users\447299\AppData\Roaming\npm\node_

modules\kinvey-cli\node_modules\lodash\lodash.js:1880:16)

  at baseWrapperValue (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-c

li\node_modules\lodash\lodash.js:4376:25)

  at LodashWrapper.wrapperValue (C:\Users\447299\AppData\Roaming\npm\node_module

s\kinvey-cli\node_modules\lodash\lodash.js:9067:14)

  at Object.file.normalizeFilesArray (C:\Users\447299\AppData\Roaming\npm\node_m

odules\kinvey-cli\node_modules\archiver-utils\file.js:203:16)

  at Archiver.bulk (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\

node_modules\archiver\lib\core.js:560:25)

  at Service.deploy (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli

\lib\service.coffee:108:13)

  at Service.deploy (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli

\lib\service.coffee:1:1)

  at C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\cmd\deploy.coff

ee:39:33

  at fn (C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\node_module

s\async\lib\async.js:717:34)

  at C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\node_modules\as

ync\lib\async.js:1170:16

  at C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\node_modules\as

ync\lib\async.js:172:37

  at C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\node_modules\as

ync\lib\async.js:677:43

  at C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\node_modules\as

ync\lib\async.js:173:37

  at C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\node_modules\as

ync\lib\async.js:1166:30

  at C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\lib\service.cof

fee:181:7

  at C:\Users\447299\AppData\Roaming\npm\node_modules\kinvey-cli\node_modules\as

ync\lib\async.js:52:16

  at Immediate.<anonymous> (C:\Users\447299\AppData\Roaming\npm\node_modules\kin

vey-cli\node_modules\async\lib\async.js:1163:34)

  at runCallback (timers.js:651:20)

  at tryOnImmediate (timers.js:624:5)

  at processImmediate [as _immediateCallback] (timers.js:596:5)



Could you help me with this also?


Thanks 

Suraj

Login or Signup to post a comment