Android Question [SOLVED] B4A v13.0 BETA - error -> "The filename or extension is too long."

scsjc

Well-Known Member
Licensed User
Longtime User
I just followed steps https://www.b4x.com/android/forum/t...is-available-for-download.162136/#post-994570,
And I'm getting an error saying "The filename or extension is too long."
I'm not sure which name it is referring to. Any help?

1721302219577.png
 

scsjc

Well-Known Member
Licensed User
Longtime User
Does it happen in both debug and release modes?

If you can send me the complete project then I'll check it here.

I have been testing with debug and release modes, and it doesn't work.

I managed to get it to work TEMPORARILY (but when I close the project in IDLE and reload it, it doesn't work anymore).

1. I load the project in the B4A editor.
2. I delete all modules from the project (leaving only MAIN).
3. I delete the code inside the main content (leaving only ... Sub Process_Globals and ... Sub Globals).
4. I compile the project ... only with the project libraries, and it compiles OK.
5. I restore the main code in the same B4A editor that I have open.
6. I add all the modules with the "add existing modules" option -> (copy to project folder).
7. I compile, and it works perfectly.

Could it be caused by the long path of the folder where the project is located? ... D:\Users\jc\_TRABAJOS\facturaone\xxxxxxxxxxxxxxxxx
I tried using a shorter path D:\facturaone and repeated the processes. It works once, but when I close the editor and reload it, it doesn't work anymore.
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
I have been testing with debug and release modes, and it doesn't work.

I managed to get it to work TEMPORARILY (but when I close the project in IDLE and reload it, it doesn't work anymore).

1. I load the project in the B4A editor.
2. I delete all modules from the project (leaving only MAIN).
3. I delete the code inside the main content (leaving only ... Sub Process_Globals and ... Sub Globals).
4. I compile the project ... only with the project libraries, and it compiles OK.
5. I restore the main code in the same B4A editor that I have open.
6. I add all the modules with the "add existing modules" option -> (copy to project folder).
7. I compile, and it works perfectly.

Could it be caused by the long path of the folder where the project is located? ... D:\Users\jc\_TRABAJOS\facturaone\xxxxxxxxxxxxxxxxx
I tried using a shorter path D:\facturaone and repeated the processes. It works once, but when I close the editor and reload it, it doesn't work anymore.
Try using a shorter path, such as: `D:\TRABAJOS\facturaone\x`, where `x` is the folder name (shorter name of that folder) where your project is located.
 
Last edited:
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
I try:
  1. I have disabled any library - compile->error - reactive library the AHSwipeToRefresh library in my project. https://www.b4x.com/android/forum/threads/ahswipetorefresh-wrapper-for-android-swipetorefresh-implementation.39355/
  2. I have renamed c:\android4 to c:\a4.


It seems to be compiling correctly now.
But this only serves to avoid a compilation error, and I might need to add the library back and then remove it.

I don't think it's a library issue, but the moment something is removed and added back in B4A, it allows for compilation.
 
Last edited:
Upvote 0

asales

Expert
Licensed User
Longtime User
I had this problem with only one of my apps (I have dozens).
Others worked fine. Others has this issue.

For now I'm using the old SDK with the Android 34 SDK updated and it's working with B4A 13 for all apps.
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
I had this problem with only one of my apps (I have dozens).
Others worked fine. Others has this issue.

For now I'm using the old SDK with the Android 34 SDK updated and it's working with B4A 13 for all apps.

The exact same thing happened to me, only in one of the applications (the largest and most complete one I have).
After trying a lot, I preferred to keep using B4A v12.80, also pointing to the Android SDK 34 (this way, at least Google doesn't say it's violating the SDK 34 standard).

But I've noticed that I'm getting Firebase errors because of the starter module:
B4X:
starter.handleStart
android.app.MissingForegroundServiceTypeException - Starting FGS without a type callerApp=ProcessRecord{5188a4a 9872:com.oficinadirecta/u0a318} targetSDK=34

I thought about putting this in the manifest, but it gives an error and doesn't work:
B4X:
SetServiceAttribute(Starter, android:foregroundServiceType, shortService)

I imagine all these are the modifications EREL is making with the new B4A V.13.
We'll have to wait for it to work better and function with our most important applications :)
Regards
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
I try:
  1. I have disabled the AHSwipeToRefresh library in my project. https://www.b4x.com/android/forum/t...-android-swipetorefresh-implementation.39355/
  2. I have renamed c:\android4 to c:\a4.


It seems to be compiling correctly now.
But this only serves to avoid a compilation error, and I might need to add the library back and then remove it.

I don't think it's a library issue, but the moment something is removed and added back in B4A, it allows for compilation.
In my case, for some reason, it worked fine under v12.8 but failed under v13 beta. This might not be the main issue anymore, but shortening the folder name also helped solve it. : D:\Users\jc\_TRABAJOS\facturaone\xxxxxxxxxxxxxxxxx to some thing like D:\Users\jc\_TRABAJOS\facturaone\x
 
Upvote 0

Situ LLC

Active Member
Licensed User
Work Perfect
Thanks Erel
 
Upvote 0

arfprogramas

Member
Licensed User
Longtime User
The same problem happens to me. I tried to build my app and get the error. After a few tests, I noticed that if I turned the BridgerLogger option to False, it compiles. Then, I can turn to True again and it keeps working. If I close the B4A and reopens, I have to do it again.

I hope that feedback helps.
 
Upvote 0

asales

Expert
Licensed User
Longtime User
I tested the tips - change name, directory, disable bridge, etc. - without success.

I'm starting to move my projects from activity format to b4xpages, I made the changes (mix of activities and b4xpages) for this project and the compile worked fine.
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
I tested the tips - change name, directory, disable bridge, etc. - without success.

I'm starting to move my projects from activity format to b4xpages, I made the changes (mix of activities and b4xpages) for this project and the compile worked fine.

I have been trying to convert the project to the b4xpages format by doing a "MIX of activities and b4xpages" and it is true that it does not give the error.
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
If anyone can send a project which reproduces the "filename or extension is too long" error then I'll check it here.


I have been trying to reproduce the error in the code to send it over, but I haven't been able to.

However, today while testing, I thought of changing the package name from the current `com.oficinadirecta` to `com.oficinadirecta.es`, and it has worked 100% of the times

I don't know if this has anything to do with it, but I should also mention that I use FirebaseAnalytics, FirebaseAuth, FirebaseNotifications, and therefore I have the `google-services.json` file.

I tried to recreate an example using my old package name with the `google-services.json` file and all the libraries I use, including the original `PRIVATESIGNKEY`, and surprisingly, it works fine, so I’m not sure what could be failing.

In summary, as a new clue that I have discovered: "If I change the package name from `com.oficinadirecta` to `com.oficinadirecta.es`, the error does not occur."

(Always using the old DEFAULT format, ... in the B4XPages format, it does not fail.)
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
Based on other reports, a possible workaround for this issue is to put the Android SDK and Java in shorter paths.

I've been testing paths like `c:\j` to make them as short as possible, but it doesn't solve the problem.



What I do know for sure is that if I set the `PACKAGENAME`, for example, to `com.oficinadirecta.es`, it works perfectly regardless of the path.

1723991522388.png
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
Sorry to interfere here, but I've been following this from a distance. It seems to me that @scsjc has provided an explanation that seems very likely.

If I change the package name from `com.oficinadirecta` to `com.oficinadirecta.es`, the error does not occur

Isn't this it? And just to be super clear what I mean: He changed from the (very long) extension ".oficinadirecta" to (the more typical length) ".es". Couldn't it be as simple as there's some internal max length for the extension?
 
Upvote 0
Top