1

Here's the problem straight up, I can't select a text file:

enter image description here

The goal is to provide my bank's Java app with a text file, so that it may do stuff with it.

In their description, they explicitly say that the file needs to be a txt format, but that's it.

I already talked to them, didn't manage to fix the issue. That's why I'm here.

Is there a way to make Finder force-accept any file type?


Some extra details

I tried these extension variants: txt text TXT, nothing worked.

At the event of opening the file dialog, this is what I get in the system console:

fault   21:07:37.789598 +0100   java    Faild to get owner UUID for url: <private> error: Error Domain=NSCocoaErrorDomain Code=260 UserInfo={NSURL=<private>, NSFilePath=<private>, NSUnderlyingError=0x7fd5d4f2d530 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
fault   21:07:37.794009 +0100   java    Faild to get owner UUID for url: <private> error: Error Domain=NSCocoaErrorDomain Code=260 UserInfo={NSURL=<private>, NSFilePath=<private>, NSUnderlyingError=0x7fd5d4f2cc30 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
error   21:07:37.872025 +0100   java    Unable to load Info.plist exceptions (eGPUOverrides)
default 21:07:39.792043 +0100   kernel  AGC:: [java pid:18638] force EG up last PID 18638 WS-ready 1 switch-state 0 IG FBs 1 EG FBs 0:f power-state 0 3D busy HDA idle system-state 1 power-level 20:20 connect-change 0
default 21:07:39.792058 +0100   kernel  AGC:: [java pid:18638] force EG up last PID 18638 WS-ready 1 switch-state 0 IG FBs 1 EG FBs 0:f power-state 0 3D busy HDA idle system-state 1 power-level 20:20 connect-change 0

And here's what the Java console shows up at that same event:

Java Web Start 11.191.2.12 x86_64
Using JRE version 1.8.0_191-b12 Java HotSpot(TM) 64-Bit Server VM
User home directory = /Users/Birowsky
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
0-5: set trace level to <n>
----------------------------------------------------
08:42:19 INFO: WRITE: com.teamdev.jxbrowser.chromium.internal.ipc.message.FocusMessage@2b023366, SocketInfo{channelId=0, browserId=0, channelType=Browser}
08:42:19 INFO: READ:  OnInvokeJSFunctionMessage{type=OnInvokeJSFunction, uid=28, name='CardReady', args='', returnValue='', errorMessage=''}, SocketInfo{channelId=0, browserId=0, channelType=Render}
CardReady() > checkServerCertificate(): true
Pozvana metoda run()
Number of readers: 1
Selected reader : 0
OS version: mac os x
Card is present!
Connection successful!
ATR: ok
Disconnection successful!
CardReady() > End: true
08:42:20 INFO: WRITE: OnInvokeJSFunctionMessage{type=OnInvokeJSFunction, uid=28, name='CardReady', args='', returnValue='b:1;', errorMessage=''}, SocketInfo{channelId=0, browserId=0, channelType=Render}
08:42:20 INFO: READ:  OnInvokeJSFunctionMessage{type=OnInvokeJSFunction, uid=29, name='ClientGetCertID', args='', returnValue='', errorMessage=''}, SocketInfo{channelId=0, browserId=0, channelType=Render}
ClientGetCertID() > checkServerCertificate(): true
08:42:20 INFO: WRITE: OnInvokeJSFunctionMessage{type=OnInvokeJSFunction, uid=29, name='ClientGetCertID', args='', returnValue='s:46;2051668607190566542320627606591412845831791822;', errorMessage=''}, SocketInfo{channelId=0, browserId=0, channelType=Render}
08:42:20 INFO: READ:  OnInvokeJSFunctionMessage{type=OnInvokeJSFunction, uid=30, name='openFiles', args='', returnValue='', errorMessage=''}, SocketInfo{channelId=0, browserId=0, channelType=Render}
openFiles() > checkServerCertificate(): true
08:42:20 INFO: WRITE: com.teamdev.jxbrowser.chromium.internal.ipc.message.UnfocusMessage@4d6101, SocketInfo{channelId=0, browserId=0, channelType=Browser}
----------------------------------------------------
>>>> Close "Open File" dialog <<<<
----------------------------------------------------
08:42:56 INFO: WRITE: OnInvokeJSFunctionMessage{type=OnInvokeJSFunction, uid=30, name='openFiles', args='', returnValue='o:undefined;', errorMessage=''}, SocketInfo{channelId=0, browserId=0, channelType=Render}
08:42:56 INFO: WRITE: com.teamdev.jxbrowser.chromium.internal.ipc.message.FocusMessage@49ffaaaa, SocketInfo{channelId=0, browserId=0, channelType=Browser}
08:42:58 INFO: WRITE: com.teamdev.jxbrowser.chromium.internal.ipc.message.UnfocusMessage@26a71c78, SocketInfo{channelId=0, browserId=0, channelType=Browser}

Here's how my Java config looks like.

  • what is the extension of the filename. Try opening it with textEdit and see if it works. – jmh Nov 23 '18 at 19:05
  • @jmh the vendor specification states that the file needs to be of txt format. So I created an empty txt file. You can see it in the screenshot as "test1.TXT". The one above it without extension, still an empty text file. I also tried a lowercase "test1.txt", still no luck. – Birowsky Nov 23 '18 at 20:10
  • You ask about the Finder, but this isn't about the Finder, it's about a standard Open dialog in a particular app. – JWWalker Nov 23 '18 at 20:29
  • @Birowsky To answer your question, if a mask was not being provided by the application, then nothing would be greyed out. Since it is, some sort of filter is obviously being applied. See developer.apple.com/library/archive/documentation/… for a programmatic description of how this is done. Not that it helps you override it, but describes what is happening. – Marc Wilson Nov 23 '18 at 20:54
  • 1
    The company may mean .text rather than .txt . It'd be rude of them, but possible. Some .rtf files (rich text) also end up getting .txt extensions by ill behaved Apps. That could be causing you problems. – Wayfaring Stranger Nov 23 '18 at 21:20
1

Filtered by Name

Apple's open dialog filters files by name and extension only. It is highly unlikely the contents of the files are being read and filtered to decide if they can be selected. Doing this would be both a security risk and a performance nightmare.

Given that, assume there is a file extension or pattern the open dialog is looking for. Being a Java process it is possible the comparison is case sensitive or looking for Window's style extensions rather than UNIX, .TXT vs .txt, or .text vs .txt.

Java Security

Alternatively, it is possible that security restrictions are stopping the Java applet from allowing you to select files on your computer.

Use the /Applications/Utilities/Console.app to look for error and warning messages reported by any java processes. If a security restriction is in force, a log message is likely.

Java Control Panel

System Preferences > Java > Java Control Panel

Within the Java Control Panel on macOS are numerous security and advanced settings that can limit the actions of a Java process.

Check you have the latest version of Java installed. Also check the security settings. Ensure warnings are shown for Mixed code verification and maybe enable the Java console to Show console.

Java Control Panel - Advanced on macOS

Report the Bug

If none of this works, be sure to report the problem to the bank. They may know about this problem and be able to supply a solution.

  • Hey, thanx for your effort! Filtered by Name: tried all variants, nothing worked. Java Security: here’s what I caught in the system console. Java Control Panel: Here’s my java config, here’s what I got in the Java Console. Let me know if something catches your eye. – Birowsky Nov 24 '18 at 20:14
  • I think it's an exaggeration to say "It is highly unlikely the contents of the files are being read and filtered to decide if they can be selected." The docs for the Cocoa delegate method panel:shouldEnableURL: say it should be fast, but not that it can't look at the contents of the file at all. However it may be more likely that this Java app simply has a bug. – JWWalker Nov 24 '18 at 21:22
  • @Birowsky please could you edit your question to add the additional information. Hidden away in the comments, few people will see this extra detail. – Graham Miln Nov 25 '18 at 8:31
  • @JWWalker I am convinced that there's a bug. I was just hoping that there was some feature that would allow us to override the filter and force select any file. – Birowsky Nov 25 '18 at 9:59
0

The application may be looking for a file with the extension .txt. For example; yourfilename.txt. TextEdit will add this extension automatically to text files that it opens. You should try opening your file in TextEdit and see if it adds the extension. If it opens the file but doesn't save it with .txt at the end, do a Save As and add the extension manually.

  • This should clear the air a bit: I just tried the same thing on Windows, it worked. The file dialog allowed me to choose ANY file. Not just txt. I would point out that on windows, the dialog was the one that java draws, instead of the one by the system. – Birowsky Nov 23 '18 at 22:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .