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

Application#compileJsps stopped working on Windows with 2.0.15 #25

Closed
StefanIlchev opened this issue Jun 28, 2023 · 14 comments
Closed

Application#compileJsps stopped working on Windows with 2.0.15 #25

StefanIlchev opened this issue Jun 28, 2023 · 14 comments
Assignees

Comments

@StefanIlchev
Copy link

After updating to gcloud 437.0.0 we started getting the following exception on Windows. It seems to have been introduced in guava 32.0.0 and fixed in guava 32.0.1.

Unable to stage:
java.lang.UnsupportedOperationException: 'posix:permissions' not supported as initial attribute
	at java.base/sun.nio.fs.WindowsSecurityDescriptor.fromAttribute(WindowsSecurityDescriptor.java:358)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.createDirectory(WindowsFileSystemProvider.java:509)
	at java.base/java.nio.file.Files.createDirectory(Files.java:700)
	at java.base/java.nio.file.TempFileHelper.create(TempFileHelper.java:134)
	at java.base/java.nio.file.TempFileHelper.createTempDirectory(TempFileHelper.java:171)
	at java.base/java.nio.file.Files.createTempDirectory(Files.java:976)
	at com.google.appengine.repackaged.com.google.common.io.TempFileCreator$JavaNioCreator.createTempDir(TempFileCreator.java:102)
	at com.google.appengine.repackaged.com.google.common.io.Files.createTempDir(Files.java:439)
	at com.google.appengine.tools.admin.Application.compileJsps(Application.java:1229)
	at com.google.appengine.tools.admin.Application.populateStagingDirectory(Application.java:994)
	at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:877)
	at com.google.appengine.tools.admin.AppAdminImpl.stageApplication(AppAdminImpl.java:76)
	at com.google.appengine.tools.admin.AppAdminImpl.stageApplicationWithDefaultResourceLimits(AppAdminImpl.java:44)
	at com.google.appengine.tools.admin.AppCfg$StagingAction.execute(AppCfg.java:921)
	at com.google.appengine.tools.admin.AppCfg.executeAction(AppCfg.java:289)
	at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:148)
	at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:88)
	at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:83)
com.google.appengine.tools.admin.AdminException: Unable to stage app: 'posix:permissions' not supported as initial attribute
	at com.google.appengine.tools.admin.AppAdminImpl.stageApplication(AppAdminImpl.java:82)
	at com.google.appengine.tools.admin.AppAdminImpl.stageApplicationWithDefaultResourceLimits(AppAdminImpl.java:44)
	at com.google.appengine.tools.admin.AppCfg$StagingAction.execute(AppCfg.java:921)
	at com.google.appengine.tools.admin.AppCfg.executeAction(AppCfg.java:289)
	at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:148)
	at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:88)
	at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:83)
Caused by: java.lang.UnsupportedOperationException: 'posix:permissions' not supported as initial attribute
	at java.base/sun.nio.fs.WindowsSecurityDescriptor.fromAttribute(WindowsSecurityDescriptor.java:358)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.createDirectory(WindowsFileSystemProvider.java:509)
	at java.base/java.nio.file.Files.createDirectory(Files.java:700)
	at java.base/java.nio.file.TempFileHelper.create(TempFileHelper.java:134)
	at java.base/java.nio.file.TempFileHelper.createTempDirectory(TempFileHelper.java:171)
	at java.base/java.nio.file.Files.createTempDirectory(Files.java:976)
	at com.google.appengine.repackaged.com.google.common.io.TempFileCreator$JavaNioCreator.createTempDir(TempFileCreator.java:102)
	at com.google.appengine.repackaged.com.google.common.io.Files.createTempDir(Files.java:439)
	at com.google.appengine.tools.admin.Application.compileJsps(Application.java:1229)
	at com.google.appengine.tools.admin.Application.populateStagingDirectory(Application.java:994)
	at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:877)
	at com.google.appengine.tools.admin.AppAdminImpl.stageApplication(AppAdminImpl.java:76)
	... 6 more
@buzzgamesnews
Copy link

buzzgamesnews commented Jun 29, 2023

I get this bug too:

The error has been appearing since yesterday ( 06/28/2023 ) I did some research and realized that the error appears after the *.jsp module scans the appengineStage files:

Beginning interaction for module default...
0% Scanning for jsp files.
0% Compiling jsp files.
Unable to stage app: 'posix:permissions' not supported as initial attribute

After I tried to remove all *.jsp files and appengineStage was successful without errors, but *.jsp files are part of the project, what can I do ?
It doesn't matter what is in these files, the error appears even if you put an empty *.jsp file in the directory webapp.

Post it on stackoverflow and on github app-gradle-plugin

Please help. can't deploy on production environment

@ludoch
Copy link
Collaborator

ludoch commented Jun 29, 2023 via email

@buzzgamesnews
Copy link

Thank you very much, I'm waiting, the process is stopped, I can't deploy the application to Google cloud

copybara-service bot pushed a commit that referenced this issue Jun 29, 2023
…uced in previous Guava version (#25)

PiperOrigin-RevId: 544404346
Change-Id: Ibf1f3c6115b812fc33ffb47f174b848dcd92288f
@Ihernandezpi
Copy link

The same issue! Waiting for the update 💯

@Emperorlou
Copy link

@ludoch I tried downgrading to 436 but the same issue seems to occur. I even tried a really old version (copied the filestructure over to a different computer that was running 2xx) and it still happened. There must be some cached file somewhere. I'll try wiping all the cache/build folders and see if that helps but if not I might be at a loss.

@ludoch
Copy link
Collaborator

ludoch commented Jun 30, 2023

How did you move back to version 436?
i.e: are you using the Maven or Gradle plugin and what is the plugin configuration? Or are you using the cloud CLI in command line mode? The plugins have their own version of the Cloud CLI tool (not the same one installed in a terminal), so need to be configured to point to an older version, like in pom.xml:

<cloudSdkVersion> 436.0.0</cloudSdkVersion>

See https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/master/USER_GUIDE.md

Also, since next week is 4rth of July US break, I do not expect a Cloud CLI release before the week after.

@StefanIlchev
Copy link
Author

StefanIlchev commented Jun 30, 2023

Notes:

  • The issue was introduced in gcloud 437.0.0 and occurs only on Windows if you have JSPs.
  • The issue does not occur on Linux regardless of whether you have JSPs.
  • I have not tried macOS but a quick web search shows that it like Linux is POSIX-compliant so the issue should not occur.
  • To work around this issue on Windows you could use an older version of gcloud e.g., 436.0.0. Here is an example of how to do that in a Gradle build script with appengine-gradle-plugin:
appengine {

	tools {
		cloudSdkVersion = '436.0.0'
	}
}

@buzzgamesnews
Copy link

Notes:

  • The issue was introduced in gcloud 437.0.0 and occurs only on Windows if you have JSPs.
  • The issue does not occur on Linux regardless of whether you have JSPs.
  • I have not tried macOS but a quick web search shows that it like Linux is POSIX-compliant so the issue should not occur.
  • To work around this issue on Windows you could use an older version of gcloud e.g., 436.0.0. Here is an example of how to do that in a Gradle build script with appengine-gradle-plugin:
appengine {

	tools {
		cloudSdkVersion = '436.0.0'
	}
}

Thx. good workaround. I try from CLI gcloud components update --version=435.0.0 but it dont work

@Emperorlou
Copy link

Notes:

  • The issue was introduced in gcloud 437.0.0 and occurs only on Windows if you have JSPs.
  • The issue does not occur on Linux regardless of whether you have JSPs.
  • I have not tried macOS but a quick web search shows that it like Linux is POSIX-compliant so the issue should not occur.
  • To work around this issue on Windows you could use an older version of gcloud e.g., 436.0.0. Here is an example of how to do that in a Gradle build script with appengine-gradle-plugin:
appengine {

	tools {
		cloudSdkVersion = '436.0.0'
	}
}

Good call! This worked for me, thanks! I suppose the lack of version control in my gradle file is also what ultimately caused the biggest problems.

@ludoch ludoch self-assigned this Jun 30, 2023
@ludoch
Copy link
Collaborator

ludoch commented Jul 11, 2023

Cloud SDK CLI has been updated and will be released next Tuesday.

@ludoch ludoch closed this as completed Jul 11, 2023
@TheCloudGate
Copy link

Hi,

Going back to previous version is not working as expected.

@ludoch when you mention next Tuesday, are you talking about 18th July?

https://cloud.google.com/sdk/docs/release-notes

Thanks.

@ludoch
Copy link
Collaborator

ludoch commented Jul 11, 2023

Going back to version 436.0.0 should work (see above thread for Maven or Gradle plugins)

Fix will be in version of the week of 18th July

@Ciberdim
Copy link

Ciberdim commented Jul 18, 2023

Updated to the new version (438.0.0), the bug is still there and it prevents users from deploying. Google must be the only business willing to leave such a bug unfixed for this long. I am seriously considering moving to Azure or AWS; this is outrageous.

@ludoch
Copy link
Collaborator

ludoch commented Jul 18, 2023

The fix is in today's 439.0.0 (2023-07-18) build.

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

7 participants