Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample Script: License check failed #4

Open
ghost opened this issue Jun 12, 2018 · 10 comments
Open

Sample Script: License check failed #4

ghost opened this issue Jun 12, 2018 · 10 comments

Comments

@ghost
Copy link

ghost commented Jun 12, 2018

Studio Version: 2017
Windows Version: Server 2012 R2 Standard
IIS Version: 6.2
PHP Version: 5.6
Error Log: https://pastebin.com/MX6j7Y7d
Modified ProjectHelper.psm1: https://pastebin.com/0mQ4QiuA

I've come across the above error after the trial period for Studio lapsed, and it has occured with both a network license and a single machine license. The test script worked just fine during the trial period, even with the above modified ProjectHelper.psm1, but now it does not. Of note is that I am attempting to call the Powershell script from a PHP script, which has also worked just fine up until the license change. Have I made some critical mistake in my modifications of your code, or is it something else?

@cromica
Copy link
Contributor

cromica commented Jun 12, 2018

In order to use the studio powershell toolkit you need a valid Studio professional license.

@ghost
Copy link
Author

ghost commented Jun 12, 2018

Yes, the company I work for has several licenses; both network and single machine type licenses, and I have tried both types is what I am saying.

@cromica
Copy link
Contributor

cromica commented Jun 12, 2018

Can you please try to run the scripts from the Studio installation folder?

@ghost
Copy link
Author

ghost commented Jun 12, 2018

I have tried this also, after, I assume, finding the same forum threads that lead you to this suggestion.

@ghost
Copy link
Author

ghost commented Jul 10, 2018

So I've tried it on a clean VM that has never had studio installed before, and installed straight to a licensed version, which resulted in success. The problem appears to be related to the trial version that I initially installed and then later licensed, as the problem doesn't manifest on a clean install straight to the licensed version of Studio.

@wyrdfish
Copy link

Did you maybe install Studio as a certain windows account then apply the actual license later on another account?

or are you php scripts running under a different user context?

@ghost
Copy link
Author

ghost commented Jul 10, 2018

Installation and license were applied by the same account.

PHP scripts are running under a different user context, but that's been consistent on both VM's I've tested this one (the one with the error, and the one without).

@wyrdfish
Copy link

So just to be clear: running the sample script works on a trial license. When the license expires and you apply a license you are getting the stack trace attached?

While I don't really know your configuration, I would be surprised if everything works properly if you have installed and licensed studio as windows account A and then are calling API (via php) from user account B, a certain amount of per user initialization is done from the setup wizard. It may be worth running the studio config wizard on the machine in the PHP user context at least once.

The error listed seems to be the pluginframework trying to make or access a folder under the user profile. Do you have a user profile fully loaded in your PHP session?

@ghost
Copy link
Author

ghost commented Jul 10, 2018

Yes, the script works on the trial license, until that expires, and giving the trial install a new license doesn't resolve the issue listed in the attached stack trace.

The setup I have is that Studio has been installed with a network admin account, and PHP is being called via IIS (running under the NetworkService user) from another machine on the network. This works just fine now that Studio has been reinstalled straight into having a shared license (a single user license works fine too).

@ghost
Copy link
Author

ghost commented Dec 12, 2018

Update on this; I've been working with our sysadmin to try and get this working, and on the VM that we got it working, which we licensed during the trial period, it still works with both a single user and shared license. The other machine that we didn't license during the trial period still does not work, even after clearing the Studio install and all its registry keys. We also attempted to remotely call the sample script placed on the working VM from the non-working VM and got the same failed license check error. We are still none the wiser as to the cause, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants