Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Print settings in viewer

619006Sep 3 2008 — edited Sep 4 2008
I've got a report set up in desktop and I need users to be able to access and print it through viewer.

The default print settings for the report don't fit on one pages, so I adjust all the column widths and scaling and save. but when it's reopened it's gone back to the default.

Hitting save on the options doesn't save these settings, and nothing else seems to work - how do I save these settings so that the users can print the report?

The annoying thing is that I've got other reports set up to do this - so it must be possible, but I've obviously done it accidentally on the other reports and have no idea how...

thanks

Comments

Scott Wesley

This is in one of your pages?
Sometimes this can occur with an ill-defined page branch - check the page processing for the relevant page.

user8952845

I don't know what I'm doing yet; I don't even know what a page branch is! I created a new app, chose a table, clicked to add a form page, saved it and clicked run, thinking that that would get me started. At this point, I just wanted to do the simplest thing possible to show that the installation works.

Scott Wesley

Ahh, problem is probably in a different layer then, something in the middle tier (ORDS)
Relevant search term would need to include reference to APEX/ORDS, otherwise too much pollution.
oracle apex ords too many redirects
Are cookies enabled on your browser?
Too Many Redirects When Cookies Are Not Enabled (0 Bytes)Does any of this apply to you?
https://geertdepaep.wordpress.com/2019/02/10/err_too_many_redirects-in-apex-login-for-http-and-not-for-https/

Billy Verreynne

Start your browser. Press F12 for the DevTools window and select the network tab. Tick preserve log so that the network log is not cleared with a new page network call.
Enter the URL in the browser tab address bar and hit enter.
Click the abort icon next to the address bar after the umpteenth redirect. This will cease redirect attempts, and allow you to investigate the redirects.
Network calls with a responses 301, 302, etc are redirects, where the HTTP header submitted contains the URL send to the web server, and the HTTP response header containing the web server supplying the URL to request instead.
Example: using URL http://oracle.com
image.pngThe 301 redirects to http://www.oracle.com
image.pngThe 302 redirects to https://www.oracle.com
image.pngEtc.
Looking at these network calls, response codes, and headers send and received, will allow you to isolate the problem URL for investigation.

Billy Verreynne

You can save the network trace as a HAR log file:
image.pngSave it as a HAR file and upload it here if you like us to have a look at it for you.

user8952845

I hope this is what you need. Thanks - much appreciated.
localhost.txt (5.41 MB)

Billy Verreynne

Not seeing any problem redirects in this HAR.
URL https://localhost:8443/ is redirected to https://localhost:8443/ords/ - which is valid and expected.
An https://localhost:8443/ords/wwv_flow.accept is redirected to https://localhost:8443/ords/f?p=4500:1000:3650541694987::::: - also valid and expected.
Do not see any other redirects.

user8952845

And yet a second tab opens with the "Too Many Redirects" error. :(

Billy Verreynne

Need a HAR trace to check that.

user8952845

As soon as I click "RUN" a second tab immediately opens with the error. I have no opportunity to do the F12 procedure. Can that be done retroactively on the new window?

Billy Verreynne

Can you not after the 2nd tab with error shows, press F12 for DevTools for the 2nd tab, and then press F5 to refresh the the tab? It should use the same 2nd tab URL again, but this time with DevTools enabled.

user8952845

You, sir, seem to know your stuff! Attached is the HAR trace from the second window, and I do see the "Too many redirects" error in there!
20201226chrome.txt (579.3 KB)

Billy Verreynne

Do not see an obvious error. You can refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie for cookie settings.
A funny - seems like IPv6 is being used as the Remote Address used by the client to identify itself to the server, is the IPv6 localhost address. Typically IPv4 is used for localhost by default in my experience. But this should not cause an issue.
The APEX cookie is set without expiry date, which defaults to the browser treating is as a session cookie. It is set as HttpOnly as a security feature, which is correct. SameSite should also beset, but should not cause redirects.
What seems to happen is that the browser sets the cookie received, and responds to the web server with that cookie. Only for the web server not to accept that cookie, and to issue a new cookie. And for this sequence to repeat and repeat...
Each request below deals with a brand new session cookie value:
apex-wait4.gifThis likely means that your APEX authentication and authorisation schema is not working - it does not accept a session cookie it just issued.
What authentication is used by your APEX application, and was this modified?

user8952845

Would the APEX installation log be helpful?
APEX)install2020-12-15_14-22-59.log (533.26 KB)

Billy Verreynne

Would the APEX installation log be helpful?
Not really - it is not an installation error.
APEX applications are assigned to an Authorisation Scheme. This authenticates the user, and also authenticates the web session used after successful logon, each time the we browser communicates with the server.
The web browser supplies the session cookie it has, and the Authentication Scheme verifies this against the web session details it has. This seems to be failing.
This can be caused by using a modified and buggy Authentication Scheme. It also could potentially be caused by the APEX application.
How is the new tab opened? What do you click to open the new tab? Why is it opened in a new tab and not the existing tab? The code implemented to do this could be buggy.

user8952845

As soon as I click run, the new tab opens all by itself. Is that not the expected behaviour? I've tried it with Chrome, Edge, and Opera as the default browser, and the same thing happens. Could ORDS have an issue?

Billy Verreynne

No. The target attribute of the anchor element needs to be set. But from the sounds of it, you are clicking the APEX IDE button to run an application - which does set the target attribute.
The APEX IDE is also an APEX application. Seeing that this runs in your case I assume, ORDS is working. ORDS does not know the difference between one or another APEX application.
I suggest a sanity check. Install a packaged APEX app and see whether it works.
If not, there is an underlying APEX issue. Though your install.log did not report errors I saw.
If it does work, then there is a problem with your APEX application definition.

user8952845

Okay. I installed a sample app (Calendar), and when I try to run it, I get a login screen. I enter the credentials and get "Your session has ended. Click here to create a new session." I click there, and it asks for credentials again, and we just keep looping around getting the "Your session has ended..." and entering the credentials again forever.
I did make some progress though. When I get the too many redirects error on my own little app, if I copy the URL from the address bar and paste it into a different browser, the app runs!
I'm curious about the self-signed certificate. Kaspersky complains about it each time I start apex. I tell it to continue anyway, and can run Apex. I'm wondering if that's creating problems down the road when I try to run an app? I put an exemption for localhost into Kaspersky, but then the browser itself complains. If I pause Kaspersky, the same thing happens. If I tell the browser to continue anyway, I get the same too many redirect errors.

Billy Verreynne

A self-signed certificate should not cause redirects. As it is not signed by recognised RA or CA, the self-signed certificate will not be accepted by default. The browser then needs to be forced to accept the certificate.
Not familiar with Kaspersky - do not use Windows on my side. Make very sure though that Kaspersky does not cause the error. It is the only foreign actor in this APEX config you have mentioned thus far, and could be root cause.
What happens when you directly try the base URL for your app without using the run button? E.g. https://localhost:8443/ords/f?p=TEST
I assume your app's APEX alias is TEST - if not, use the app ID (e.g. 100) instead of TEST in the URL.
This URL should result in your APEX app's login page to be displayed, with an APEX session created on the database side, and a session cookie to have been accepted by the browser. You should be able to successfully logon to your test app.
Try this directly after loading the browser - prior to using other APEX URLs, or opening other tabs.
If it works, open a second tab and run the APEX IDE and sign into the workspace - then test the app in the first tab to determine if it still works.

user8952845

chromewebdata.txt (215.6 KB)Using https://localhost:8443/ords/f?p=TEST works fine.
When I open a second tab and go to the IDE url, I immediately get ERR_TOO MANY_REDIRECTS in that second tab. The first tab continues to work properly. The HAR trace of the second tab is attached.

Billy Verreynne

It is using IPv6. Unlikely that this is the cause of the issue, but you can confirm anyway by doing the same test just done using https://127.0.0.1:8443/ords/f?p=TEST URL. This URL forces IPv4 to be used.
You should get the same error with IPv4. If not, then it would be very weird that IPv6 is triggering the redirects. Potentially a bug in APEX or ORDS.
What I do suspect though is that this is not a browser, ORDS, or APEX issue. But something else.
APEX creates a session ID and passes the browser a session cookie, telling the browser to redirect to that URL that contains the new session ID.
The browser does this. Uses the redirect URL, and with that URL request, it passes the session cookie it received.
This is what the HAR file shows.
Only APEX responds as if the cookie it received is invalid, or missing, for the URL session ID it needs to service. And the only logical explanation at this stage is, that this is exactly what happens.
I suspect that the cookie is either removed or reset in transit - so that what APEX receives from the browser, is not what the browser passed. And this only happens for multiple session cookies for the same URL. Single/first session cookie is fine and not tampered with. Multiple session cookies lead to some kind of external interference.
As localhost networking is used, the thing that causes this external interference is on your platform.
More facts - you tested several browsers, and the browsers all behaved the same way. No other user reports of APEX and ORDS not working on Windows 10. Thus the assumptions that the redirect issue is not caused by the browser, ORDS or APEX, but an external component (like security s/w) is the cause.

AndyH

What seems to happen is that the browser sets the cookie received, and responds to the web server with that cookie. Only for the web server not to accept that cookie, and to issue a new cookie. And for this sequence to repeat and repeat...
I've seen this happen with a badly configured proxy that either doesn't convert the cookie path correctly or doesn't correctly deal with https/http - e.g. the initial logon generates a HTTPS cookie, but the next call is looking for an HTTP cookie and so can't read the previously generated one. Similar things happen if you access the site in one tab using HTTPS and then access in another tab with HTTP.

user8952845

"Thus the assumptions that the redirect issue is not caused by the browser, ORDS or APEX, but an external component (like security s/w) is the cause."
This is a pretty fresh installation of Win10 with very little installed - Photoshop, Lightroom, Microsoft Office, and Kaspersky mainly. I've tried pausing Kaspersky to no avail. Both Kaspersky and Windows 10 itself are set to automatically detect proxy server settings. I never did anything proxy related. Following your suggestion (Andy), I did set Kaspersky to not use proxy server, but that too made no difference.
I really do appreciate both of you helping out!
KasperskyProxy.png (19.59 KB)Win10Proxy.png (48 KB)

AndyH

I never did anything proxy related.

I was mainly thinking of cases where you might use Apache or Nginx to proxy to Tomcat running ORDS. Often, you'd use the proxy to terminate HTTPS connections and access Tomcat under HTTP: you need to configure the proxy connections so that APEX doesn't try to generate HTTP-based URL's.
As soon as I click run, the new tab opens all by itself.
When you are in developer mode, 'run' will open a new tab so that you can run the application and make changes to pages in the background.

Billy Verreynne

It's unlikely to be a proxy issue as you are using the localhost address - that web traffic never leaves your platform.
I do not use Windows much anymore. But have seen very weird things that is related to Windows and network security applications and devices. I have our Windows and network security folk saying that there are no deep packet inspection of web traffic , but have shown how changing the HTTP User Agent in packets causes those packets to be denied access to our Internet proxy servers. Only deep packet inspection could be responsible for this in my view. And they have no idea why this is happening.
The weird thing in your case is that the first initial APEX session is created successfully and works - be that APEX IDE, our your APEX app. Subsequent sessions fail.
So it it not a binary case of working or failing. Which makes identifying the cause of the error more complex.
Not sure what else you could do to troubleshoot this issue. I would use tools such as curl and tcpdump/WireShark for troubleshooting, but one needs to be familiar with the HTTP and TCP protocols. The troubleshooting needs to isolate and test various moving parts in order to identify just where the error occurs.

user8952845

I guess I'll just resign myself to using the workaround of developing in one browser and running my app in another. Not the worst thing that could happen!
I'm just a little surprised that I'm the only one having this problem though. This is a fresh vanilla install of Windows 10 Pro 20H2 done at the end of November. I just did a clean boot with all non-Microsoft services and startup programs disabled and experienced the same exact behaviour.
Anyway, I do really thank you for the attempt to help me. I appreciate it!
Wayne

AndyH

I've tried pausing Kaspersky to no avail. Both Kaspersky and Windows 10 itself are set to automatically detect proxy server settings.
Kaspersky Proxy Server (or Kaspersky Secure Network, Certificate Scanner, Encrypted Connection Scanning or similar?) attempts to get in the middle of all HTTPS conversations where it acts as a proxy - your browser connects to KPS and it contacts the destination. You can usually confirm if this is happening by checking the certificate that you see associated with a site - if it mentions Kaspersky then you know that the proxy is running and intercepting your calls. I generally try to turn this 'feature' off as it can hide issues with remote sites without letting you deal with it.

Billy Verreynne

Think Andy is on the right track here - as something local is interfering with HTTP traffic on your platform.

Evgeni Nikolov

Wayne, did you manage to resolve the issue? I experience exactly the same one and I have fresh install of Windows 10 Pro on VirtualBox . No antivirus whatsoever.

OracleXE184_Win64
apex_20.2_en
ords-20.4.3.050.1904

user8952845

No, I've just resigned myself to using two browsers and copying and pasting links. My Windows install is also fresh and very vanilla.
Sorry,
Wayne

User_VOOGL

I had similar issue after moving my PDB to a new location. Found out that when I installed a packaged application, I could run it while being logged into the Admin side without the redirect issue.
So I compared the two apps. What worked for me was to go into the application's (with redirect issue) Security Attributes, and under Session Management change "Rejoin Sessions" to Enabled for Public Sessions and set "Deep Linking" to Enabled.
Then it worked.
Sharing if in case it helps someone.

user560751

Hi,
I have same issue on windows server. any solution for this?
Thanks

user8952845

No, I gave up on APEX and moved on. :(

user13365516

Don't give up user8952845, I had this same issue when I exported then imported the APP to another server. I was running it in safe mode to prevent the error. Now thanks to the solution shared by User_VOOGL problem solved.

user8952845

Good to know. When time permits, maybe I'll give it another shot. Thanks for the reply!

George Stathis

Hello,

we have the same problem here.

We run APEX 22.2, Oracle 18C, and ORDS 22.4.1 on Windows Server 2019.

We have set up HTTPS for the connection.

We can run the APEX IDE and everything works fine until we press the [Run Application], which causes the ERR_TOO_MANY_REDIRECTS error. The same error occurs if we try to open the APEX IDE in another browser tab. And exactly the same error occurs if we try to run an APEX application from the same server.

If we close the browser completely, we can run one application, but not a second one. The first application runs (either from within the browser or from the desktop icon as a PWA app) but the second application, gives the error ERR_TOO_MANY_REDIRECTS.

We have almost the same configuration in the development server (without HTTPS and with Windows Server 2008) and everything works fine.

Can it be a parameter in the ORDS configuration file that has to do with the HTTPS that gives the error? All the apps run from the same domain using HTTPS.

Any ideas?

user-6yvyt

Same problem. Try to reinstall the ords in a different folder. Now it works for me without error.

1 - 37
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 2 2008
Added on Sep 3 2008
2 comments
331 views