Exclude Thumbs.db from Sencha Cmd build - extjs

When executing "sencha app build production", I receive the following error message:
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: Cannot find file : C:\apache24\htdoc
s\extjs\myapp\build\production\myapp\resources\images\Thumbs.db (Access denied)
I know that the answer could be "use a system tool to close the file handle". But I am tired of doing so, and since the Thumbs.db files are useless, I'd like to exclude copying them from the build process - once and for all times.
I tried via app.json, where I found an exclude for svn files:
"resources": [
"resources/images"
],
"ignore": [
"\.svn$",
"\.db$"
],
but that didn't yield the expected result. Any ideas?

Related

Firebase hosting deployment failing

Running firebase deploy will run for a few minutes before giving me a timeout error Error: ESOCKETTIMEDOUT
I've successfully deployed multiple times earlier, without changing anything but the frontend of my project (written in React).
I have a separate folder with my cloud functions, which deploy perfectly with firebase deploy --only functions
I've tried regular deployment with firebase deploy as well as with --except functions flag but with no luck.
Also tried updating npm and firebase-tools
running firebase deploy --debug yields the following error after a few minutes:
[2019-09-12T16:25:59.115Z] FirebaseError: Task 6822eef99ebcce0df4baf9cc03e49b399d046c7cdfeb5b2a2ef2511c1df963d1 failed: retries exhausted after 6 attempts
[2019-09-12T16:25:59.115Z] [hosting][upload queue][FINAL] max=7278, min=7278, avg=7278, active=4, complete=2, success=1, errored=1, retried=25, total=6, elapsed=192701
[2019-09-12T16:25:59.127Z] FirebaseError: Task f98dce8e7830e8cd5881bc5e109453c208ff7fc643d61ad64ca34a7d098abc2c failed: retries exhausted after 6 attempts
[2019-09-12T16:25:59.127Z] FirebaseError: Task 5a7166c6cab1624c8a0c074fc535a23685c338be838012dced4006be3cc6dedd failed: retries exhausted after 6 attempts
[2019-09-12T16:25:59.128Z] FirebaseError: Task 76dd5b5551e5cd383875692455ff415bf8df56c97f67e4a3746e3c53c23478e1 failed: retries exhausted after 6 attempts
[2019-09-12T16:25:59.129Z] FirebaseError: Task 541bb1a8843dd0c62ea7e673f2260c85e0b456f35cfde358b6ab3be936e9c705 failed: retries exhausted after 6 attempts
[2019-09-12T16:25:59.211Z] Error: ESOCKETTIMEDOUT
at ClientRequest.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:816:19)
at Object.onceWrapper (events.js:298:28)
at ClientRequest.emit (events.js:209:13)
at ClientRequest.EventEmitter.emit (domain.js:476:20)
at TLSSocket.emitRequestTimeout (_http_client.js:690:9)
at Object.onceWrapper (events.js:298:28)
at TLSSocket.emit (events.js:209:13)
at TLSSocket.EventEmitter.emit (domain.js:476:20)
at TLSSocket.Socket._onTimeout (net.js:468:8)
at listOnTimeout (internal/timers.js:531:17)
Error: Task 6822eef99ebcce0df4baf9cc03e49b399d046c7cdfeb5b2a2ef2511c1df963d1 failed: retries exhausted after 6 attempts
Delete the hidden folder in you project root directory.
.firebase/hosting.*.cache
Deleting the .firebase folder and tried firebase deploy command again. Things seemed to be working fine.
As #thmsdnnr mentioned, it seems that this error was caused by issues at firebase. Tried a new deployment first thing in the morning and everything went through first try.
There are two reasons to happen this.
by deleting .firebase folder in your root folder will solve problem.
if this dosen't work,
your internet connection may slow and size of files in your project may be bigger. so try with fast internet connection.
with slow internet, if you try deploying again and again, you will see that number of files uploading decreases on console. that means your files are getting uploaded, but it taking too much time, and firebase is getting exhausted.
as explained already by #thmsdnnr, it is indeed a firebase issue, but can be due to some issues at your end as well.
For example, for me it was the slow internet connection responsible for it.
Besides, you can always delete the ".firebase" folder, and re-build your project for starting afresh with hosting.
I also faced an issue like that
Error: Task 91525507ddf6d644ed40f9c46c3e30a2164f496acb1328512d4cf5eaf8d18768 failed: retries exhausted after 6 attempts
PS D:\React\amazon-clone> firebase deploy
But I fixed it. Put this change in your firebase.json file:
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
to
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
and it will work fine.
I was struggling with this problem too. After trying many methods, I solved the deployment issue as follows;
At first, I deleted node modules and reinstalled it again. I deleted firebase files (.firebase, firebase.json)
Then I applied them;
Update Firebase CLI via "npm i -g firebase-tools"
Log in to your account via "firebase login",
Initialize the project via "firebase init hosting"
And lastly deploy it via "firebase deploy --only hosting"
I was able to deploy my project on firebase with these steps. I hope someone else's problem is solved this way.
I recommend you to check here for detailed information.
As mentioned in the error massage: Timeout reached making request to https://url_path.
I found the same problem, the mine relates to the network.
So check your network connection.

AppEngine App Deploy gives "Failed to copy file."

I'm deploying a Laravel app to a fresh App Engine project. But I'm getting this error constantly. I tried creating a new project and deploying too.
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 9625 files to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [3] Errors were encountered while copying files to App Engine.
Details: [
[
{
"#type": "type.googleapis.com/google.rpc.ResourceInfo",
"description": "Failed to copy file.",
"resourceName": "https://storage.googleapis.com/staging.rsvp.appspot.com/df4bc71e8832337e997291648609c4e207b5aa55",
"resourceType": "file"
}
]
]
WHat is the problem here and how can I fix it?
The reason for this issue was, I had some large size files ( > 30Mb ) in my project folder. I removed them and redeployed, it worked without an issue.
As OP already mentioned, the reason is large files. Here is how you can also find out which file is causing the problem.
If you have an error such as
Details: [
[
{
"#type": "type.googleapis.com/google.rpc.ResourceInfo",
"description": "Failed to copy file.",
"resourceName": "https://storage.googleapis.com/staging.bemmu1-hrd.appspot.com/b463c152ee1498bd4d27c1ea67c7f8e82cb4b220",
"resourceType": "file"
}
]
]
Note the hash that appears in resourceName, in this case "b463c152ee1498bd4d27c1ea67c7f8e82cb4b220".
Search for it in the most recent log file (mine was /Users/bemmu/.config/gcloud/logs/2019.07.30/00.45.43.657001.log) and you'll find it as part of a really long string, in my case:
...'templates/envato/images/arrangement.png': {'sourceUrl': 'https://storage.googleapis.com/staging.bemmu1-hrd.appspot.com/b463c152ee1498bd4d27c1ea67c7f8e82cb4b220'...
From this I could see that in my case the offending file was arrangement.png

Why does Sencha CMD build fail with PhantomJS error code 2?

Problem: "Error capturing theme" while building Sencha CMD workspace application for sub-project A (has source files), but sub-project B (no source files) builds fine.
Scenario:
Created new Sencha workspace (CMD 5.1.0.26) and added a new project A.
Project A builds fine (sencha app build -c production)
I add a main view and reference a module contained in a common folder (/project/common/js/).
sencha app watch works fine however sencha app build -c production now fails on Project A.
To sanity check, I generate a new application inside my framework folder, referencing the same ExtJS version (5.1.0.107), let's call it project B, and it builds just fine.
Project A is still failing with this error:
[INF] Writing content to /MyWorkspace/ProjectA/sass/example/bootstrap.json
[INF] Writing content to /MyWorkspace/ProjectA/sass/example/bootstrap.js
[INF] Capturing theme image
[ERR] loading page /MyWorkspace/ProjectA/sass/example/theme.html
== Unhandled Error ==
TypeError: '''undefined''' is not a function (evaluating '''Ext.require([
'''Ext.layout.Context'''
])''')
file:///MyWorkspace/ext/packages/ext-theme-base/sass/example/render.js:7
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
[ERR]
[ERR] Total time: 46 seconds
[ERR] The following error occurred while executing this line:
/MyWorkspace/ProjectA/.sencha/app/slice-impl.xml:306: The following error occurred while executing this line:
/MyWorkspace/ProjectA/.sencha/app/slice-impl.xml:307: The following error occurred while executing this line:
/MyWorkspace/ProjectA/.sencha/app/slice-impl.xml:163: com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
Workaround:
I've prevented the error for now by editing sencha.cfg and adding the line:
skip.slice=1
However files in /MyWorkspace/ProjectA/sass/ are the same between the failing Project A and Project B with the exception that the content differs slightly in files that reference the application names, but that is all.
The ExtJS files are few enough that I've done a manual walk through of the differences, with the exception of bootstrap.json which didn't lend itself to anymore than a visual skim.
I'd be most interested if anyone has pointers as to what is likely missing or different between these projects that appears to be causing part of my framework to be missing when it's needed in evaluating line 7 of render.js.
Let me know if you need more supporting information. Thanks!
While building extjs application we have got this error
com.sencha.exceptions.ExProcess: phantomjs process exited with code 1
Solution:
We downloaded the latest version of phantomjs from here and replaced the phantomjs.exe file with cmd
phantomjs.exe "cmd/bin.windows/phantomjs/phantomjs.exe"
It worked for us.

How can I configure the sencha app build command to use a custom named app folder?

I need to use a custom named 'app' folder for my Ext JS 4.1.3 application. Sencha documentation is clear that this folder name is a configurable value called 'appFolder'.
Environment:
Ext JS 4.1.3
Sencha Cmd 3.1.2.342
Ruby 1.9
Steps that I took:
sencha generate workspace C:\temp\workspace
sencha -sdk C:\tools\extjs4.1.3 generate app common C:\temp\workspace\common
cd C:\temp\workspace\common
sencha app build
SUCCESSFUL
edited the app.js and set appFolder: 'custom':
Ext.application({
appFolder: 'custom' ...
Also renamed the 'C:\temp\workspace\common\app' folder to 'C:\temp\workspace\common\custom'
sencha app build.
[ERR] def was null
[ERR] failed to find meta class definition for name common.controller.Main
[ERR] def was null
[ERR] failed to find meta class definition for name common.view.Viewport
[ERR] C2008: Requirement had no matching files (common.view.Viewport) -- unknown
-file:-1
[ERR] Error executing page compilation Failed to find any files for C:\TEMP\workspace\common\app.js::ApplicationAutoDependency::common.view.Viewport
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExBuild: com.sencha.exceptions.ExBuild: Failed to find any files for C:\TEMP\workspace\common\app.js::ApplicationAutoDependency::common.view.Viewport
[ERR]
[ERR] Total time: 6 seconds
[ERR] The following error occurred while executing this line:
C:\TEMP\workspace\common\.sencha\app\build-impl.xml:408: The following error occurred while executing this line:
C:\TEMP\workspace\common\.sencha\app\build-impl.xml:381: com.sencha.exceptions.ExBuild: com.sencha.exceptions.ExBuild: Failed to find any files for C:\TEMP\workspace\common\app.js::ApplicationAutoDependency::common.view.Viewport
Edit file yourAppFolder/.sencha/app/sencha.cfg
Change classpath=${app.dir}/app to classpath=${app.dir}/custom

Sencha Cmd Error: Build Failed

After running sencha generated app Practise '../www/Practise' it showed some errors. Here the error message:
[ERR] BUILD FAILED
[ERR] java.lang.NullPointerException
[ERR]
[ERR] Total time :4 seconds
[ERR] com.sencha.exceptions.BasicException
I dont know if this is the same issue you were having but this is why I got that error:
I tried to generate the app unsuccessfully
This created a directory for my app and put some files in it but the app was incomplete
I fixed the original issue and ran the
command again.
I got the error you were receiving.
This was because the folder in www/yourproject already existed. I deleted this folder and ran the command successfully.
Hope this helps!!

Resources