input type="file" is not opening the file browser from Chrome Extension - google-chrome-extension

I'm not sure if it's a bug or something simple that I just missed...
Here is a simple test case. The index.html is:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Test file input field</title>
</head>
<body>
<label for="file">File</label>
<input type="file" name="file" id="file"/>
</body>
</html>
The manifest is calling it inside a popup:
"popup": "index.html"
I was expecting to get the 'file browser' after clicking the 'file' button but it is vanish after 0.5sec.
(It's on Mac 10.6.8 and Chrome 14.0.835.186)
Any idea?
Thanks...

This is a bug, logged at http://crbug.com/98920

Related

Vue code doesn't show up with Webpack Bundle Tracker

I run both the vue and the django.
I have installed webpack_loader and have it in installed apps.
I have the WEBPACK_LOADER in settings.py
WEBPACK_LOADER = {
'DEFAULT': {
'BUNDLE_DIR_NAME': 'dist/',
'STATS_FILE': os.path.join(BASE_DIR, 'frontend', 'webpack-stats.json'),
}
}
frontend is the name when creating vue.
Here is some more details KeyError at / 'assets' and ModuleNotFoundError: No module named 'webpack_loader'
My page source from http://localhost:8000/ looks like this
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QuestionTime</title>
</head>
<body>
<h1>Vue JS</h1>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<script type="text/javascript" src="http://0.0.0.0:8080/bundle.js" ></script>
</body>
</html>
My page source from http://localhost:8080/ looks like this
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="/favicon.ico">
<title>hello-vue</title>
<link href="/js/about.js" rel="prefetch"><link href="/js/app.js" rel="preload" as="script"><link href="/js/chunk-vendors.js" rel="preload" as="script"></head>
<body>
<noscript>
<strong>We're sorry but hello-vue doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<script type="text/javascript" src="/js/chunk-vendors.js"></script><script type="text/javascript" src="/js/app.js"></script></body>
</html>
When I use (django-webpack-loader 1.0.0), I get KeyError at /
When I use (django_webpack-loader 0.7.0), I get no errors, but the vue code doesn't show up (But I see it at localhost:8080).
Just started to work Today, I didn't do anything, and it started to work. I tried 2 times to make a new project with the same code, downloaded all the stuff again.
Didn't work. But then my vue code suddenly stopped working. I turned the server on and off. And then I saw that my vue code had been updated.
I then went to localhost:8000 to see if it worked, and it did.
I believe that God fixed it. Not sure what else it would be.
EDIT: 8 July 2022
I happened to get the error: TypeError: expected string or bytes-like object.
It was point to {% render_bundle 'chunk-vendors' %}
The problem was that I had upgraded the django-webpack-loader to the latest version, the error went away when I use this version django-webpack-loader==0.6.0.
I tried django-webpack-loader==0.7.0 and it works as well.
The version of webpack-bundle-tracker I'm using is 0.4.3

How to add a bundle file ( created using ejs ) that renders in ejs node app?

I have a react/node app and i am using ejs like so:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>EJS Is Fun</title>
<!-- CSS (load bootstrap from a CDN) -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.2/css/bootstrap.min.css">
<style>
body { padding-top:50px; }
</style>
</head>
<body class="container">
<header>
Hi header here !
</header>
<main>
<div class="jumbotron">
<h1>This is great</h1>
<p>Welcome to templating using EJS</p>
</div>
</main>
<footer>
HI footer here.
</footer>
</body>
</html>
I would like to add a script tag which basically added the main entry point of the react app. how do i do this ?
Basically when webpack loads the document on npm run start (i'am using create-react-app) the js bundle file are automatically added to the html document. similarly how can i add these bundled files to my ejs file ?
P.S.
Webpack in dev mode does't really generate any physical files.
the node and react are running on on different ports.

Cannot render css for cesium viewer from local server

I am trying to render the basic cesium viewer from a local development server using node.js with express (cesium 1.57 downloaded via npm). The page loads correctly when the CSS is loaded from cesium's servers, but not when I try to load it locally from my node_modules folder. I'd like to have the files server side so I can eventually change the display and certain sandbox settings for the infoboxes to suit the app I'd like to build.
This works:
index.html:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>mapsTest</title>
<script src="/scripts/Cesium.js"></script>
<link href="https://cesiumjs.org/releases/1.57/Build/Cesium/Widgets/widgets.css" rel="stylesheet" />
<!-- <link type=text/css href='/styles/widgets.css'></link> -->
</head>
<body>
<div id="cesiumContainer" style="width: 100%; height:100%"></div>
<script>
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhYzhjNjk0My04MzNjLTQyZTItOWRkOS1lZmQxYjE2YzM4NDYiLCJpZCI6MTAyMTYsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NTU5NjMzNjB9.DSk7rCttQeOvYyCnuesEtoiA8OUSGwitJaiBUUeqlxw';
var viewer = new Cesium.Viewer('cesiumContainer');
</script>
</body>
</html>
While this doesn't work:
index.html:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>mapsTest</title>
<script src="/scripts/Cesium.js"></script>
<!-- <link href="https://cesiumjs.org/releases/1.57/Build/Cesium/Widgets/widgets.css" rel="stylesheet" /> -->
<link type=text/css href='/styles/widgets.css'></link>
</head>
<body>
<div id="cesiumContainer" style="width: 100%; height:100%"></div>
<script>
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhYzhjNjk0My04MzNjLTQyZTItOWRkOS1lZmQxYjE2YzM4NDYiLCJpZCI6MTAyMTYsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NTU5NjMzNjB9.DSk7rCttQeOvYyCnuesEtoiA8OUSGwitJaiBUUeqlxw';
var viewer = new Cesium.Viewer('cesiumContainer');
</script>
</body>
</html>
app.js: setting up the routes for getting the local css file
app.use('/styles', express.static(__dirname + '/node_modules/cesium/Build/CesiumUnminified/Widgets'));
app.get('/styles/widgets.css', function(req, res) {
res.sendFile(__dirname + '/node_modules/cesium/Build/CesiumUnminified/Widgets/widgets.css');
});
I've tried copy and pasting the code that is pulled from the cesium css link into my local copy of widgets.css, though it still doesn't work, so I am wondering whether this has something to do with how node/express loads css files? There are no errors in the firefox or chrome consoles when I load the page.
I think you might just be missing rel="stylesheet" in the link there.
Also type="text/css" is missing the double-quotes.

Fitnesse on Linux with Jenkins

I've been trying to setup Fitnesse on a centos7 machine with Jenkins but ran into a few problems.
I have Jenkins using the Fitnesse plugin and starting an instance of Fitnesse which it does fine but then it cant seem to connect to the started Fitnesse server with an error message "Fitnesse server NOT started in 30000ms on URL: "
At First I thought it was a problem with localhost not being able to connect to it but I am able to connect on the centos machine using firefox and localhost: while Jenkins is also trying (and failing) to connect to it. So I used telnet to ping it and it produces the following:
Trying ::1...
Connected to localhost.
Escape character is '^]'.
HTTP/1.1 408 Request Time-out
Content-Length: 2131
Connection: close
Server: FitNesse-v20150424
Content-Type: text/html; charset=UTF-8
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Error Occurred</title>
<!--[if lt IE 9]>
<script>
document.createElement('header');
document.createElement('nav');
document.createElement('section');
document.createElement('article');
document.createElement('footer');
</script>
<![endif]-->
<link rel="shortcut icon" type="image/png" href="/files/fitnesse/images/favicon.png" />
<link rel="stylesheet" type="text/css" href="/files/fitnesse/css/fitnesse_wiki.css" />
<link rel="stylesheet" type="text/css" href="/files/fitnesse/css/fitnesse_pages.css" />
<link rel="stylesheet" type="text/css" href="/files/fitnesse/wysiwyg/wysiwyg.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="/files/fitnesse/bootstrap/css/fitnesse-bootstrap.css">
<link rel="stylesheet" type="text/css" href="/files/fitnesse/question.mark/question.mark.css" />
<script src="/files/fitnesse/javascript/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="/files/fitnesse/javascript/fitnesse.js" type="text/javascript"></script>
<script src="/files/fitnesse/bootstrap/js/bootstrap.js" type="text/javascript"></script>
<script src="/files/fitnesse/bootstrap/js/respond.js" type="text/javascript"></script>
</head>
<body class="error">
<nav class="navbar-fixed-top " role="navigation">
<div class="navbar navbar-default">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<a class="navbar-brand" href="/FrontPage"><span>FitNesse</span></a>
</div>
</div>
<ol class="page-actions btn-group">
<li class="expandall btn btn-xs">Expand All</li>
<li class="collapseall btn btn-xs">Collapse All</li>
</ol>
<ol class="breadcrumb">
<li>Error Occurred</li>
</ol>
</nav>
<header>
</header>
<article>
<center>The client request has been unproductive for too long. It has timed out and will now longer be processed.</center>
</article>
</body>
</html>
Connection closed by foreign host
So it looks like it actually IS conncting to Fitnesse, but Fitnesse isn't responding properly or something? Does anyone have any insight on the problem or possible solutions?
Are you setting up this pipeline job on a node?
It seems the Fitnesse plugin connects to Fitnesse from the master always. Hence, localhost will not answer, if fitnesse was started on a node.
For now, you will have to run fitnesse jobs only on the master.

Going through JavascriptMVC 'rapid start' tutorial getting a 403 error

I'm getting started with JavascriptMVC, going through the rapid start todo sample application. I'm getting a 403 error on the first step. Here is my code:
todos.html
<html>
<head></head>
<body>
<ul id='todos'></ul>
<input id='editor' />
<script type='text/javascript'
src='.../steal/steal.js?todos/todos.js'>
</script>
</body>
</html>
todos.js
steal('jquery/class',
'jquery/model',
'jquery/dom/fixture',
'jquery/view/ejs',
'jquery/controller',
'jquery/controller/route',
function($){
});
Any thoughts on what could be causing this error? I figure I must be able to access to the repository because it is 403 error, but I don't understand why there should be any authorization problem.
As long as this is your 'root/todos/' directory, use this:
<!DOCTYPE html>
<html>
<head></head>
<body>
<ul id='todos'></ul>
<input id='editor'/>
<script src='../steal/steal.js?todos/todos.js'></script>
</body>
</html>
I think you have an extra dot inside:
<script src='.../steal/steal.js?todos/todos.js'></script>

Resources